summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2021-12-06 12:49:52 +0100
committerHubert Hirtz <hubert@hirtz.pm>2021-12-06 13:03:28 +0100
commit75155fa7a3733d7e68574b6e56901d8704ca39d8 (patch)
treeeea9ac1d2d37aea78ebafc3eab3cecb8cd069f0e
parentBump history batch limits (diff)
Allow selecting buffers with Alt+{1..9}
-rw-r--r--app.go2
-rw-r--r--doc/senpai.1.scd3
2 files changed, 5 insertions, 0 deletions
diff --git a/app.go b/app.go
index 73039b8..9d84b05 100644
--- a/app.go
+++ b/app.go
@@ -538,6 +538,8 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) {
app.win.ScrollDownHighlight()
case 'p':
app.win.ScrollUpHighlight()
+ case '1', '2', '3', '4', '5', '6', '7', '8', '9':
+ app.win.GoToBufferNo(int(ev.Rune()-'0') - 1)
}
} else {
app.win.InputRune(ev.Rune())
diff --git a/doc/senpai.1.scd b/doc/senpai.1.scd
index 7517d14..c64a82c 100644
--- a/doc/senpai.1.scd
+++ b/doc/senpai.1.scd
@@ -93,6 +93,9 @@ of messages are in the timeline:
Go to the next highlight, or to the (most recent) end of the timeline if
there is none.
+*ALT-{1..9}*
+ Go to buffer by index.
+
*UP*, *DOWN*, *LEFT*, *RIGHT*, *HOME*, *END*, *BACKSPACE*, *DELETE*
Edit the text in the input field.