[master] 60da5d783 Fold varnishstat ncurses top/bottom bindings
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Dec 9 08:42:08 UTC 2019
commit 60da5d7836077ae9a029e8bcbec0fac4a4dcd1cb
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Dec 9 08:47:27 2019 +0100
Fold varnishstat ncurses top/bottom bindings
They have the same effect in practice despite looking different, so the
simpler option is kept. Also considering vi key bindings <j> and <k>
documented in the previous commit, <g> and <G> would definitely have the
same meaning as <HOME> and <END> in this context.
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index 7da4e6ef0..a2987188e 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -896,9 +896,11 @@ handle_keypress(int ch)
page_start += l_points;
break;
case KEY_HOME:
+ case 'g':
current = 0;
break;
case KEY_END:
+ case 'G':
current = n_ptarray - 1;
break;
case 'd':
@@ -909,14 +911,6 @@ handle_keypress(int ch)
scale = 1 - scale;
rebuild = 1;
break;
- case 'g':
- current = 0;
- page_start = 0;
- break;
- case 'G':
- current = n_ptarray - 1;
- page_start = (current - l_points) + 1;
- break;
case '+':
interval += 0.1;
(void)snprintf(notification_message, NOTIF_MAXLEN,
diff --git a/doc/sphinx/reference/varnishstat.rst b/doc/sphinx/reference/varnishstat.rst
index 043372a4f..d8a7e106b 100644
--- a/doc/sphinx/reference/varnishstat.rst
+++ b/doc/sphinx/reference/varnishstat.rst
@@ -85,10 +85,10 @@ The following keys control the interactive display:
<PAGEDOWN> or <SPACE> or <CTRL-f>
Navigate the counter list one page down.
-<HOME>
+<HOME> or <g>
Navigate the counter list to the top.
-<END>
+<END> or <G>
Navigate the counter list to the bottom.
<d>
@@ -99,12 +99,6 @@ The following keys control the interactive display:
<e>
Toggle scaling of values.
-<g>
- Go to the top of the counter list.
-
-<G>
- Go to the bottom of the counter list.
-
<v>
Increase verbosity. Defaults to only showing informational
counters.
More information about the varnish-commit
mailing list