When that 'F' focus command has been applied to a task
in forest view it should remain as the topmost process
in a particular window. But without this patch that is
not guaranteed. Newly forked/cloned tasks 'above' such
a process result in task(s) appearing which shouldn't.
The effect was as if that up arrow key scrolled beyond
the topmost parent task, which would never be allowed.
[ since scrolling is permitted within a focus range, ]
[ when any task 'above' our focus/topmost task ends, ]
[ we respond as if scrolled with the down arrow key. ]
[ that result is completely appropriate. if the user ]
[ wishes to return to a focused parent, the up arrow ]
[ or home key can be used to accomplish such a goal. ]
Signed-off-by: Jim Warner <james.warner@comcast.net>
while (i+1 < PIDSmaxt && rSv(i+1) > level)
++i;
q->focus_end = i + 1; // make 'focus_end' a proper fencpost
+ // watch out for newly forked/cloned tasks 'above' us ...
+ if (q->begtask < q->focus_beg) {
+ q->begtask = q->focus_beg;
+ q->begnext = 0; // as 'mkVIZoff' but in any window
+ }
}
#undef rSv
} // end: forest_config
reversed = 0;
// potentially scroll forward ...
- if (w->begnext > beg) {
+ if (w->begnext > 0) {
fwd_redux:
for (i = w->begtask; i < end; i++) {
if (wins_usrselect(w, i)