[master] e96c01d99 Document varnishstat ncurses up/down bindings
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Dec 9 08:42:08 UTC 2019
commit e96c01d99d451855beba78855de735b30fadbd8c
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Mon Dec 9 08:44:32 2019 +0100
Document varnishstat ncurses up/down bindings
And avoid magic ASCII numbers when we could use character literals
instead.
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index 0b5338225..7da4e6ef0 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -871,13 +871,13 @@ handle_keypress(int ch)
{
switch (ch) {
case KEY_UP:
- case 107: /* k */
+ case 'k':
if (current == 0)
return;
current--;
break;
case KEY_DOWN:
- case 106: /* j */
+ case 'j':
if (current == n_ptarray - 1)
return;
current++;
diff --git a/doc/sphinx/reference/varnishstat.rst b/doc/sphinx/reference/varnishstat.rst
index 38684472a..043372a4f 100644
--- a/doc/sphinx/reference/varnishstat.rst
+++ b/doc/sphinx/reference/varnishstat.rst
@@ -73,10 +73,10 @@ Key bindings
The following keys control the interactive display:
-<UP>
+<UP> or <k>
Navigate the counter list one line up.
-<DOWN>
+<DOWN> or <j>
Navigate the counter list one line down.
<PAGEUP> or <b> or <CTRL-b>
More information about the varnish-commit
mailing list