m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-13 22:03:47 -05:00

Fix handling of arrow keys with alt and/or shift modifier

Fix #2254

- Properly handle extra chars in the buffer. Patch suggested by @mckelly2833.
- Support alt-arrow sequences in \e[1;3A format
- Support shift-alt-arrow sequences in \e[1;10A format
This commit is contained in:
Junegunn Choi
2020-11-24 19:36:58 +09:00
parent 1efef88b6e
commit 3fe8eeedc5
5 changed files with 87 additions and 5 deletions

View File

@@ -524,6 +524,14 @@ func parseKeyChords(str string, message string) map[int]string {
chord = tui.PgUp
case "pgdn", "page-down":
chord = tui.PgDn
case "alt-shift-up", "shift-alt-up":
chord = tui.AltSUp
case "alt-shift-down", "shift-alt-down":
chord = tui.AltSDown
case "alt-shift-left", "shift-alt-left":
chord = tui.AltSLeft
case "alt-shift-right", "shift-alt-right":
chord = tui.AltSRight
case "shift-up":
chord = tui.SUp
case "shift-down":