Feature #682
- Added feature #682, which allows the configuration variable 'defaultheight' to override the assumed height of 24 lines when 'detection' is not enabled (thanks to Steve Rader).
This commit is contained in:
@@ -72,6 +72,9 @@
|
|||||||
can now be modified as a group (thanks to Bryce Harrington, Eric Fluger).
|
can now be modified as a group (thanks to Bryce Harrington, Eric Fluger).
|
||||||
+ Added feature #679, which makes color rules match project names in a left-
|
+ Added feature #679, which makes color rules match project names in a left-
|
||||||
most fashion, like filters (thanks to ch077179).
|
most fashion, like filters (thanks to ch077179).
|
||||||
|
+ Added feature #682, which allows the configuration variable 'defaultheight'
|
||||||
|
to override the assumed height of 24 lines when 'detection' is not enabled
|
||||||
|
(thanks to Steve Rader).
|
||||||
+ Added feature #700, which adds tab-completion of built-in tags.
|
+ Added feature #700, which adds tab-completion of built-in tags.
|
||||||
+ Added feature #710, which adds an attribute modifier prefix to return the
|
+ Added feature #710, which adds an attribute modifier prefix to return the
|
||||||
complement of a filtered set (thanks to Dan White).
|
complement of a filtered set (thanks to Dan White).
|
||||||
|
|||||||
2
NEWS
2
NEWS
@@ -63,6 +63,8 @@ New configuration options in taskwarrior 2.0.0
|
|||||||
command or value may be.
|
command or value may be.
|
||||||
- New 'hyphenate' setting controls whether long lines are hyphenated when
|
- New 'hyphenate' setting controls whether long lines are hyphenated when
|
||||||
broken during text-wrapping.
|
broken during text-wrapping.
|
||||||
|
- New 'defaultheight' setting overrides the assumed 24 lines when 'detection'
|
||||||
|
is disabled. This setting only affects charts.
|
||||||
|
|
||||||
Newly deprecated features in taskwarrior 2.0.0
|
Newly deprecated features in taskwarrior 2.0.0
|
||||||
|
|
||||||
|
|||||||
@@ -169,7 +169,13 @@ using, for text wrapping.
|
|||||||
The width of output used when auto-detection support is not available. Defaults
|
The width of output used when auto-detection support is not available. Defaults
|
||||||
to 80. If set to 0, is interpreted as infinite width, therefore with no
|
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
|
word-wrapping; useful when redirecting report output to a file for subsequent
|
||||||
manipulation.
|
handling.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.B defaultheight=24
|
||||||
|
The height of output used when auto-detection support is not available. Defaults
|
||||||
|
to 24. If set to 0, is interpreted as infinite height. Useful when redirecting
|
||||||
|
charts to a file for subsequent handling.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.B avoidlastcolumn=no
|
.B avoidlastcolumn=no
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ std::string Config::defaults =
|
|||||||
"# Terminal\n"
|
"# Terminal\n"
|
||||||
"detection=on # Detects terminal width\n"
|
"detection=on # Detects terminal width\n"
|
||||||
"defaultwidth=80 # Without detection, assumed width\n"
|
"defaultwidth=80 # Without detection, assumed width\n"
|
||||||
|
"defaultheight=24 # Without detection, assumed height\n"
|
||||||
"avoidlastcolumn=no # Fixes Cygwin width problem\n"
|
"avoidlastcolumn=no # Fixes Cygwin width problem\n"
|
||||||
"hyphenate=on # Hyphenates lines wrapped on non-word-breaks\n"
|
"hyphenate=on # Hyphenates lines wrapped on non-word-breaks\n"
|
||||||
"#editor=vi # Preferred text editor\n"
|
"#editor=vi # Preferred text editor\n"
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ int CmdShow::execute (std::string& output)
|
|||||||
" default.due"
|
" default.due"
|
||||||
" default.priority"
|
" default.priority"
|
||||||
" default.project"
|
" default.project"
|
||||||
|
" defaultheight"
|
||||||
" defaultwidth"
|
" defaultwidth"
|
||||||
" dependency.confirmation"
|
" dependency.confirmation"
|
||||||
" dependency.indicator"
|
" dependency.indicator"
|
||||||
|
|||||||
@@ -80,7 +80,12 @@ int Context::getWidth ()
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int Context::getHeight ()
|
int Context::getHeight ()
|
||||||
{
|
{
|
||||||
int height = 24;
|
// Determine window size.
|
||||||
|
int height = config.getInteger ("defaultheight");
|
||||||
|
|
||||||
|
// A zero height value means 'infinity', which is approximated here by 2^16.
|
||||||
|
if (height == 0)
|
||||||
|
return 65536;
|
||||||
|
|
||||||
if (config.getBoolean ("detection"))
|
if (config.getBoolean ("detection"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user