Fossil SCM
Adjust width auto-detection on Windows for more reasonable line breaks when the final character is a '-'. Seen with comment for check-in [4514910a5f] and a console width of 233.
Commit
f4cab56c64636a404c8fc9e057e41368e96c4afe
Parent
9270ae240d1730e…
1 file changed
+1
-1
+1
-1
| --- src/comformat.c | ||
| +++ src/comformat.c | ||
| @@ -46,11 +46,11 @@ | ||
| 46 | 46 | #if defined(_WIN32) |
| 47 | 47 | if( lineLength<0 ){ |
| 48 | 48 | CONSOLE_SCREEN_BUFFER_INFO csbi; |
| 49 | 49 | memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO)); |
| 50 | 50 | if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi) ){ |
| 51 | - tlen = csbi.srWindow.Right - csbi.srWindow.Left - indent + 1; | |
| 51 | + tlen = csbi.srWindow.Right - csbi.srWindow.Left - indent; | |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | #elif defined(TIOCGWINSZ) |
| 55 | 55 | if( lineLength<0 ){ |
| 56 | 56 | struct winsize w; |
| 57 | 57 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -46,11 +46,11 @@ | |
| 46 | #if defined(_WIN32) |
| 47 | if( lineLength<0 ){ |
| 48 | CONSOLE_SCREEN_BUFFER_INFO csbi; |
| 49 | memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO)); |
| 50 | if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi) ){ |
| 51 | tlen = csbi.srWindow.Right - csbi.srWindow.Left - indent + 1; |
| 52 | } |
| 53 | } |
| 54 | #elif defined(TIOCGWINSZ) |
| 55 | if( lineLength<0 ){ |
| 56 | struct winsize w; |
| 57 |
| --- src/comformat.c | |
| +++ src/comformat.c | |
| @@ -46,11 +46,11 @@ | |
| 46 | #if defined(_WIN32) |
| 47 | if( lineLength<0 ){ |
| 48 | CONSOLE_SCREEN_BUFFER_INFO csbi; |
| 49 | memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO)); |
| 50 | if( GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi) ){ |
| 51 | tlen = csbi.srWindow.Right - csbi.srWindow.Left - indent; |
| 52 | } |
| 53 | } |
| 54 | #elif defined(TIOCGWINSZ) |
| 55 | if( lineLength<0 ){ |
| 56 | struct winsize w; |
| 57 |