mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #511
- Fixed bug #511, which caused display problem on Cygwin when colored output used the full width of the terminal. The 'avoidlastcolumn' configuration variable forces taskwarrior to never use the last column.
This commit is contained in:
parent
a1dee148b4
commit
0f5a4434ff
5 changed files with 20 additions and 4 deletions
|
@ -52,6 +52,9 @@
|
|||
Cech).
|
||||
|
||||
# Tracked Bugs, sorted by ID.
|
||||
+ Fixed bug #511, which caused display problem on Cygwin when colored output
|
||||
used the full width of the terminal. The 'avoidlastcolumn' configuration
|
||||
variable forces taskwarrior to never use the last column.
|
||||
+ Fixed bug #594, which broke the 'all' report with a combination of bad regex
|
||||
handling and a formatting bug (thanks to Steve Rader).
|
||||
+ Fixed bug #605, which gave misleading project completion percentages under
|
||||
|
|
|
@ -166,6 +166,12 @@ to 80. If set to 0, is interpreted as infinite width, therefore with no
|
|||
word-wrapping; useful when redirecting report output to a file for subsequent
|
||||
manipulation.
|
||||
|
||||
.TP
|
||||
.B avoidlastcolumn=no
|
||||
Causes the width of the terminal minus one to be used as the full width. This
|
||||
avoids placing color codes in the last column which can cause problems for
|
||||
Cygwin users. Default value is 'no'.
|
||||
|
||||
.TP
|
||||
.B editor=vi
|
||||
Specifies which text editor you wish to use for when the
|
||||
|
|
|
@ -65,6 +65,7 @@ std::string Config::defaults =
|
|||
"# Terminal\n"
|
||||
"detection=on # Detects terminal width\n"
|
||||
"defaultwidth=80 # Without detection, assumed width\n"
|
||||
"avoidlastcolumn=no # Fixes Cygwin width problem\n"
|
||||
"#editor=vi # Preferred text editor\n"
|
||||
"edit.verbose=yes # Include comments in files created during task edit\n"
|
||||
"\n"
|
||||
|
|
|
@ -67,10 +67,10 @@ int CmdShow::execute (const std::string&, std::string& output)
|
|||
// Note that there is a leading and trailing space, to make it easier to
|
||||
// search for whole words.
|
||||
std::string recognized =
|
||||
" annotations bulk burndown.bias calendar.details calendar.details.report "
|
||||
"calendar.holidays calendar.legend color calendar.offset "
|
||||
"calendar.offset.value color.active color.due color.due.today "
|
||||
"color.blocked color.burndown.done color.burndown.pending "
|
||||
" annotations avoidlastcolumn bulk burndown.bias calendar.details "
|
||||
"calendar.details.report calendar.holidays calendar.legend color "
|
||||
"calendar.offset calendar.offset.value color.active color.due "
|
||||
"color.due.today color.blocked color.burndown.done color.burndown.pending "
|
||||
"color.burndown.started color.overdue color.pri.H color.pri.L color.pri.M "
|
||||
"color.pri.none color.recurring color.tagged color.footnote color.header "
|
||||
"color.debug color.alternate color.calendar.today color.calendar.due "
|
||||
|
|
|
@ -61,6 +61,12 @@ int Context::getWidth ()
|
|||
}
|
||||
|
||||
width = terminal_width;
|
||||
|
||||
// Ncurses does this, and perhaps we need to as well, to avoid a problem on
|
||||
// Cygwin where the display goes right up to the terminal width, and causes
|
||||
// and odd color wrapping problem.
|
||||
if (config.getBoolean ("avoidlastcolumn"))
|
||||
--width;
|
||||
}
|
||||
|
||||
return width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue