mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-04 03:18:33 +02:00
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:
parent
397d1c2d09
commit
6f38e10cab
6 changed files with 20 additions and 2 deletions
|
@ -71,6 +71,7 @@ std::string Config::defaults =
|
|||
"# Terminal\n"
|
||||
"detection=on # Detects terminal width\n"
|
||||
"defaultwidth=80 # Without detection, assumed width\n"
|
||||
"defaultheight=24 # Without detection, assumed height\n"
|
||||
"avoidlastcolumn=no # Fixes Cygwin width problem\n"
|
||||
"hyphenate=on # Hyphenates lines wrapped on non-word-breaks\n"
|
||||
"#editor=vi # Preferred text editor\n"
|
||||
|
|
|
@ -134,6 +134,7 @@ int CmdShow::execute (std::string& output)
|
|||
" default.due"
|
||||
" default.priority"
|
||||
" default.project"
|
||||
" defaultheight"
|
||||
" defaultwidth"
|
||||
" dependency.confirmation"
|
||||
" dependency.indicator"
|
||||
|
|
|
@ -80,7 +80,12 @@ int Context::getWidth ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
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"))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue