From faa1e4de0d51f10d474b1c7554838f05de2d22ac Mon Sep 17 00:00:00 2001 From: Dennis Kaarsemaker Date: Thu, 21 Nov 2019 18:42:38 +0100 Subject: [PATCH] Make + and + work On many systems + and + are mapped to make the cursor move a word back and forward respectively. This is done by mapping the `\e[1;5C` and `\e[1;5D` sequences. This patch maps those sequences in this readline implementation as well. --- utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils.go b/utils.go index af4e005..9f0e7a1 100644 --- a/utils.go +++ b/utils.go @@ -102,8 +102,14 @@ func escapeExKey(key *escapeKeyPair) rune { switch key.typ { case 'D': r = CharBackward + if key.attr == "1;5" { + r = MetaBackward + } case 'C': r = CharForward + if key.attr == "1;5" { + r = MetaForward + } case 'A': r = CharPrev case 'B':