mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 10:07:19 +02:00
Feature #415
- Added feature #415, which supports displaying just a single page of tasks, by specifying either 'limit:page' to a command, or 'report.xxx.limit:page' in a report specification (thanks to T. Charles Yun). - Modified the 'next' report to only display a page, by default.
This commit is contained in:
parent
2f85941d37
commit
916b8641b3
13 changed files with 239 additions and 28 deletions
|
@ -167,3 +167,36 @@ int Context::getWidth ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Context::getHeight ()
|
||||
{
|
||||
// Determine window size, and set table accordingly.
|
||||
int height = 25; // TODO Is there a better number?
|
||||
|
||||
#ifdef HAVE_LIBNCURSES
|
||||
if (config.getBoolean ("curses"))
|
||||
{
|
||||
#ifdef FEATURE_NCURSES_COLS
|
||||
initscr ();
|
||||
height = LINES;
|
||||
#else
|
||||
WINDOW* w = initscr ();
|
||||
height = w->_maxy + 1;
|
||||
#endif
|
||||
endwin ();
|
||||
|
||||
std::stringstream out;
|
||||
out << "Context::getHeight: ncurses determined height of " << height << " characters";
|
||||
debug (out.str ());
|
||||
}
|
||||
else
|
||||
debug ("Context::getHeight: ncurses available but disabled.");
|
||||
#else
|
||||
std::stringstream out;
|
||||
out << "Context::getHeight: no ncurses, using height of " << height << " characters";
|
||||
debug (out.str ());
|
||||
#endif
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue