From e7a0ad24b06d76d1da7ee5be15b6c8fb6b393499 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 30 Nov 2018 18:02:59 +0000 Subject: [PATCH] Add missing display messages when toggling modes. PR: 233667 Submitted by: James Wright MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18331 --- usr.bin/top/top.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 2279479409b1..a4bdb5013861 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -985,6 +985,9 @@ main(int argc, char *argv[]) break; case CMD_viewtog: displaymode = displaymode == DISP_IO ? DISP_CPU : DISP_IO; + new_message(MT_standout | MT_delayed, + " Displaying %s statistics.", + displaymode == DISP_IO ? "IO" : "CPU"); header_text = format_header(uname_field); display_header(true); d_header = i_header; @@ -992,9 +995,15 @@ main(int argc, char *argv[]) break; case CMD_viewsys: ps.system = !ps.system; + new_message(MT_standout | MT_delayed, + " %sisplaying system processes.", + ps.system ? "D" : "Not d"); break; case CMD_showargs: fmt_flags ^= FMT_SHOWARGS; + new_message(MT_standout | MT_delayed, + " %sisplaying process arguments.", + fmt_flags & FMT_SHOWARGS ? "D" : "Not d"); break; case CMD_order: new_message(MT_standout,