]> granicus.if.org Git - procps-ng/commit
top: improve vertical scroll management for 'i' toggle
authorJim Warner <james.warner@comcast.net>
Sun, 12 Jul 2015 09:44:44 +0000 (04:44 -0500)
committerCraig Small <csmall@enc.com.au>
Tue, 21 Jul 2015 11:23:44 +0000 (21:23 +1000)
commitc07f6c5e6d6170ef3f2373b4d86988184c3235bf
tree63d5e213d087db0a4e4da336d86c2747294df7c8
parent5e73c832623cc99442a5d5bc2100b4d7ad323eb8
top: improve vertical scroll management for 'i' toggle

When a user is taking advantage of the scroll features
it is likely a scrolled vertical position is well past
the first displayable task. That is especially true of
top's forest view ('V') mode where those early systemd
attached processes are generally not very interesting.

As such, should the idle mode toggle ('i') be employed
a distorted display is almost guaranteed because tasks
that have used some cpu, and thus should be displayed,
have already been skipped by virtue of their position.

So this patch temporarily nullifies vertical scrolling
during the period when idle tasks are not being shown.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c