]> 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:16:32 +0000 (20:16 +1000)
commit8281ac4f98cf04c51cbeb746d214201531d660ec
tree74a6e601425a4f092bd06221d73ada00dd936ff7
parent5a72a03e609254dcda724048958bf21dad6c0c17
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