Support modifiers in special key mappings (#1248)

* Support modifiers in mappings

* Update docs

* Support cmap keybindings as well

* Implement push

* Move order of escape key check

* Add safety check

* Fix safety check

* Factor out common logic
This commit is contained in:
Joe Lim authored and GitHub committed 2023-05-20 17:37:39 +03:00
1 parent 88b3c999af
commit 1be7d2689a
5 files changed
+75 -29

No files matched your search

+1 -1
View File
@@ -275,7 +275,7 @@ func naturalLess(s1, s2 string) bool {
}
}
var reAltKey = regexp.MustCompile(`<a-(.)>`)
var reModKey = regexp.MustCompile(`<(c|s|a)-(.+)>`)
var reWord = regexp.MustCompile(`(\pL|\pN)+`)
var reWordBeg = regexp.MustCompile(`([^\pL\pN]|^)(\pL|\pN)`)