~taiite/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH v2] Allow selecting buffers with Alt+{1..9}

Details
Message ID
<20211206114952.1614-1-leonhenrik.plickat@stud.uni-goettingen.de>
DKIM signature
missing
Download raw message
Patch: +6 -0
---
v1 -> v2: document keybinds in man page
 app.go           | 3 +++
 doc/senpai.1.scd | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/app.go b/app.go
index 2b0ba82..956c89e 100644
--- a/app.go
+++ b/app.go
@@ -513,6 +513,7 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) {
		}
	case tcell.KeyBacktab:
		ok := app.win.InputAutoComplete(-1)

		if ok {
			app.typing()
		}
@@ -535,6 +536,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.

-- 
2.34.0
Details
Message ID
<08d727a4-539b-2101-12c8-eccb7b7170db@hirtz.pm>
In-Reply-To
<20211206114952.1614-1-leonhenrik.plickat@stud.uni-goettingen.de> (view parent)
DKIM signature
missing
Download raw message
Thanks, pushed!

On 06/12/2021 12:49, Leon Henrik Plickat wrote:
> ---
> v1 -> v2: document keybinds in man page
>   app.go           | 3 +++
>   doc/senpai.1.scd | 3 +++
>   2 files changed, 6 insertions(+)
> 
> diff --git a/app.go b/app.go
> index 2b0ba82..956c89e 100644
> --- a/app.go
> +++ b/app.go
> @@ -513,6 +513,7 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) {
>   		}
>   	case tcell.KeyBacktab:
>   		ok := app.win.InputAutoComplete(-1)
> +
>   		if ok {
>   			app.typing()
>   		}

Next time, please use "git add -p" to avoid checking in those diffs. :)
Reply to thread Export thread (mbox)