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-21 00:00:00 -05:00
committed by Craig Small
parent 6aedeac667
commit 9d59ddc466
2 changed files with 31 additions and 9 deletions

View File

@@ -388,6 +388,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 ------------------------------------------ */
/* /////////////////////////////////////////////////////////////// */