ignore quoted and escaped characters when splitting keybindings into actions (#3612)

This commit is contained in:
matthias314
2025-01-20 14:28:38 -05:00
committed by GitHub
parent 9b3f7ff240
commit f5debdf8fe
3 changed files with 26 additions and 4 deletions

View File

@@ -100,9 +100,7 @@ func BufMapEvent(k Event, action string) {
break
}
// TODO: fix problem when complex bindings have these
// characters (escape them?)
idx := strings.IndexAny(action, "&|,")
idx := util.IndexAnyUnquoted(action, "&|,")
a := action
if idx >= 0 {
a = action[:idx]