Skip to content

Commit

Permalink
Handle Home and End keys in varnishstat.
Browse files Browse the repository at this point in the history
This has bugged me (slightly) for ages.

Too trivial to warrant its own line(s) in test-case/u00008.vtc.
  • Loading branch information
lkarsten committed Jan 9, 2019
1 parent e46ae71 commit 3e15c14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/varnishstat/varnishstat_curses.c
Expand Up @@ -890,6 +890,12 @@ handle_keypress(int ch)
if (page_start + l_points < n_ptarray - 1) if (page_start + l_points < n_ptarray - 1)
page_start += l_points; page_start += l_points;
break; break;
case KEY_HOME:
current = 0;
break;
case KEY_END:
current = n_ptarray - 1;
break;
case 'd': case 'd':
hide_unseen = 1 - hide_unseen; hide_unseen = 1 - hide_unseen;
rebuild = 1; rebuild = 1;
Expand Down
6 changes: 6 additions & 0 deletions doc/sphinx/reference/varnishstat.rst
Expand Up @@ -85,6 +85,12 @@ The following keys control the interactive display:
<PAGEDOWN> or <SPACE> <PAGEDOWN> or <SPACE>
Navigate the counter list one page down. Navigate the counter list one page down.


<HOME>
Navigate the counter list to the top.

<END>
Navigate the counter list to the bottom.

<d> <d>
Toggle between showing and hiding unseen counters. Unseen Toggle between showing and hiding unseen counters. Unseen
counters are those that has been zero for the entire runtime counters are those that has been zero for the entire runtime
Expand Down

0 comments on commit 3e15c14

Please sign in to comment.