]> granicus.if.org Git - procps-ng/commit
top: fix two potential 'alternate display mode' abends
authorJim Warner <james.warner@comcast.net>
Mon, 31 May 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Wed, 2 Jun 2021 10:06:32 +0000 (20:06 +1000)
commit84e85611c36d31a478e1b62e5668671d9389265d
tree24c182178ff4efcbf831ed438a5ff4acefc17d08
parente400f0be473ffccd3d8094ad6440ea063ccd8dbc
top: fix two potential 'alternate display mode' abends

This commit will address potential abends upon leaving
the windows help or color mapping screens and invoking
alternate display mode ('A').  It only happens if that
current window was changed with multiple 'a'/'w' keys.

So now, rather than leaving a trail of negative values
in the 'begtask' field, compliments of that win_select
function, we'll remove the mkVIZrow1 macro. Henceforth
it will be issued just once per user interaction. Thus
a promise of 'Curwin' only being impacted is restored.

[ my thanks to Vladimir Chren for reporting this bug ]

Reference(s):
https://gitlab.com/procps-ng/procps/-/issues/210
https://gitlab.com/procps-ng/procps/-/merge_requests/135

Discovered by:Vladimir Chren <vladimir.chren@gmail.com>
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c