~sircmpwn/aerc

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] config/bindings: allow strings to contain '<'

Details
Message ID
<20210919222209.35171-1-git@hollyburn.io>
DKIM signature
missing
Download raw message
Patch: +11 -0
---
 config/bindings.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/config/bindings.go b/config/bindings.go
index 9956b41..3a07505 100644
--- a/config/bindings.go
+++ b/config/bindings.go
@@ -99,6 +99,7 @@ var (
func ParseKeyStrokes(keystrokes string) ([]KeyStroke, error) {
	var strokes []KeyStroke
	buf := bytes.NewBufferString(keystrokes)
	skipNext := false
	for {
		tok, _, err := buf.ReadRune()
		if err == io.EOF {
@@ -106,9 +107,19 @@ func ParseKeyStrokes(keystrokes string) ([]KeyStroke, error) {
		} else if err != nil {
			return nil, err
		}
		if skipNext {
			skipNext = false
			strokes = append(strokes, KeyStroke{
				Key:  tcell.KeyRune,
				Rune: tok,
			})
			continue
		}
		// TODO: make it possible to bind to < or > themselves (and default to
		// switching accounts)
		switch tok {
		case '\\':
			skipNext = true
		case '<':
			name, err := buf.ReadString(byte('>'))
			if err == io.EOF {
2.33.0
Details
Message ID
<CEE7P4QWYDPE.QAFZUSJY5O6Y@cloudsdale.eq>
In-Reply-To
<20210919222209.35171-1-git@hollyburn.io> (view parent)
DKIM signature
missing
Download raw message
shot at a fix for https://todo.sr.ht/~sircmpwn/aerc2/516
Reply to thread Export thread (mbox)