diff options
author | Jim Warner <james.warner@comcast.net> | 2021-08-08 00:00:00 -0500 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2021-08-09 22:03:23 +1000 |
commit | 243bca8ab079cf09c7d34811c8a986dbfd4b2359 (patch) | |
tree | 1face15e987900e3967ecdc4f4a3d76d529009af | |
parent | 23776571a74ce9c526b0171ca8ba7ec0357d8002 (diff) | |
download | procps-ng-243bca8ab079cf09c7d34811c8a986dbfd4b2359.tar.gz |
top: thread mode transitions should remove focus ('F')
The commit referenced below forced a return to row one
whenever there was a thread mode transition. Now, with
our new focus ('F') feature, we should adopt a similar
philosophy so as to avoid potential display anomalies.
Reference(s)
. Jun 2018, force row 1 w/ thread mode transition
commit 19ec80bd416c570a70f2fa7fa7e84a2667d71a08
Signed-off-by: Jim Warner <james.warner@comcast.net>
-rw-r--r-- | top/top.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4796,6 +4796,7 @@ static void write_rcfile (void) { static void keys_global (int ch) { WIN_t *w = Curwin; // avoid gcc bloat with a local copy + int i; switch (ch) { case '?': @@ -4835,7 +4836,8 @@ static void keys_global (int ch) { if (!CHKw(w, View_STATES)) show_msg(fmtmk(N_fmt(THREADS_show_fmt) , Thread_mode ? N_txt(ON_word_only_txt) : N_txt(OFF_one_word_txt))); - Winstk[0].begtask = Winstk[1].begtask = Winstk[2].begtask = Winstk[3].begtask = 0; + for (i = 0 ; i < GROUPSMAX; i++) + Winstk[i].begtask = Winstk[i].focus_pid = 0; // force an extra procs refresh to avoid %cpu distortions... Pseudo_row = PROC_XTRA; break; |