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.

mistachkin 2014-06-16 21:02 UTC autoadjust
Commit f4cab56c64636a404c8fc9e057e41368e96c4afe
1 file changed +1 -1
+1 -1
--- src/comformat.c
+++ src/comformat.c
@@ -46,11 +46,11 @@
4646
#if defined(_WIN32)
4747
if( lineLength<0 ){
4848
CONSOLE_SCREEN_BUFFER_INFO csbi;
4949
memset(&csbi, 0, sizeof(CONSOLE_SCREEN_BUFFER_INFO));
5050
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;
5252
}
5353
}
5454
#elif defined(TIOCGWINSZ)
5555
if( lineLength<0 ){
5656
struct winsize w;
5757
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button