summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-02-01 11:12:59 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-02-01 17:03:59 +0900
commite1e171a3c458b8bc7dc347cbbd89be30f490ffb8 (patch)
treeae2c4275ae78cce08d345740c0d32295a31cc361 /src/options.go
parentd075c00015c3a2045061f289f0a089bc7ad6de5a (diff)
downloadfzf-e1e171a3c458b8bc7dc347cbbd89be30f490ffb8.tar.gz
Add toggle-bind
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/options.go b/src/options.go
index fec9596c..a22916e3 100644
--- a/src/options.go
+++ b/src/options.go
@@ -1336,7 +1336,7 @@ const (
func init() {
executeRegexp = regexp.MustCompile(
- `(?si)[:+](become|execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|transform)-(?:query|prompt|(?:border|list|preview|input|header)-label|header|search|nth)|transform|change-(?:preview-window|preview|multi)|(?:re|un)bind|pos|put|print|search)`)
+ `(?si)[:+](become|execute(?:-multi|-silent)?|reload(?:-sync)?|preview|(?:change|transform)-(?:query|prompt|(?:border|list|preview|input|header)-label|header|search|nth)|transform|change-(?:preview-window|preview|multi)|(?:re|un|toggle-)bind|pos|put|print|search)`)
splitRegexp = regexp.MustCompile("[,:]+")
actionNameRegexp = regexp.MustCompile("(?i)^[a-z-]+")
}
@@ -1620,7 +1620,7 @@ func parseActionList(masked string, original string, prevActions []*action, putA
actions = append(actions, &action{t: t, a: actionArg})
}
switch t {
- case actUnbind, actRebind:
+ case actUnbind, actRebind, actToggleBind:
if _, err := parseKeyChordsImpl(actionArg, spec[0:offset]+" target required"); err != nil {
return nil, err
}
@@ -1705,6 +1705,8 @@ func isExecuteAction(str string) actionType {
return actUnbind
case "rebind":
return actRebind
+ case "toggle-bind":
+ return actToggleBind
case "preview":
return actPreview
case "change-header":