top: a few tweaks for those scrolling (mostly) changes

This patch just addresses some edge cases with respect
to 'unseen' tasks. Given the ability to preserve other
filters in the rcfile, it's entirely possible the very
first task(s) may not be visible at top startup. Also,
when switching between windows ('a'/'w') we should try
to always position its row #1 on some visible process.

Lastly, a window might have *NO* visible tasks at all.
Therefore, protect 'window_hlp' from an infinite loop.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2018-06-23 12:00:00 -05:00
committed by Craig Small
parent 2c2d86e6cc
commit c6e68e2fed
2 changed files with 33 additions and 11 deletions

View File

@@ -474,6 +474,10 @@ typedef struct WIN_t {
#define SCROLLAMT 8
#endif
// Support for a proper (visible) row #1 whenever Curwin changes
// ( or a certain vertical scrolling key has been struck )
#define mkVIZrow1(q) { q->begtask -= 1; q->begnext = +1; }
/* Special Section: end ------------------------------------------ */
/* /////////////////////////////////////////////////////////////// */