~delthas/senpai-dev

app: treat Shift+Backspace as Backspace v1 APPLIED

Lauri Tirkkonen: 1
 app: treat Shift+Backspace as Backspace

 1 files changed, 4 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~delthas/senpai-dev/patches/53895/mbox | git am -3
Learn more about email & git

[PATCH] app: treat Shift+Backspace as Backspace Export this patch

before ffb806d777cb0123d276f0c03463fa0fdda1a4ae, both Shift+Backspace
and Ctrl+Backspace acted as "erase previous character", but since then
Backspace does nothing if modified by Shift or Ctrl. I find that I often
try to backspace while still having Shift held down from a previous
character I typed, so make Shift+Backspace work as it did previously.
---
 app.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app.go b/app.go
index ea96281..87f8f6a 100644
--- a/app.go
+++ b/app.go
@@ -747,6 +747,10 @@ func (app *App) handleKeyEvent(ev vaxis.Key) {
		if app.win.InputBackspace() {
			app.typing()
		}
	} else if keyMatches(ev, vaxis.KeyBackspace, vaxis.ModShift) {
		if app.win.InputBackspace() {
			app.typing()
		}
	} else if keyMatches(ev, vaxis.KeyDelete, 0) {
		if app.win.InputDelete() {
			app.typing()
-- 
2.45.2

-- 
Lauri Tirkkonen | lotheac @ IRCnet
Hi,

Thanks for your patch!

Applied with a tiny code style change.