[master] 3e15c14ff Handle Home and End keys in varnishstat.

Lasse Karstensen lasse.karstensen at gmail.com
Wed Jan 9 07:59:06 UTC 2019


commit 3e15c14ff6fcd009b90f5136c8c4b3265ac20f60
Author: Lasse Karstensen <lasse.karstensen at gmail.com>
Date:   Wed Jan 9 08:41:26 2019 +0100

    Handle Home and End keys in varnishstat.
    
    This has bugged me (slightly) for ages.
    
    Too trivial to warrant its own line(s) in test-case/u00008.vtc.

diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index 4b1703e6c..1038f0200 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -890,6 +890,12 @@ handle_keypress(int ch)
 		if (page_start + l_points < n_ptarray - 1)
 			page_start += l_points;
 		break;
+	case KEY_HOME:
+		current = 0;
+		break;
+	case KEY_END:
+		current = n_ptarray - 1;
+		break;
 	case 'd':
 		hide_unseen = 1 - hide_unseen;
 		rebuild = 1;
diff --git a/doc/sphinx/reference/varnishstat.rst b/doc/sphinx/reference/varnishstat.rst
index 023a6d784..d8b7f2399 100644
--- a/doc/sphinx/reference/varnishstat.rst
+++ b/doc/sphinx/reference/varnishstat.rst
@@ -85,6 +85,12 @@ The following keys control the interactive display:
 <PAGEDOWN> or <SPACE>
 	Navigate the counter list one page down.
 
+<HOME>
+	Navigate the counter list to the top.
+
+<END>
+	Navigate the counter list to the bottom.
+
 <d>
 	Toggle between showing and hiding unseen counters. Unseen
 	counters are those that has been zero for the entire runtime


More information about the varnish-commit mailing list