|
|
|
@ -889,7 +889,7 @@ func init() {
|
|
|
|
|
// Backreferences are not supported.
|
|
|
|
|
// "~!@#$%^&*;/|".each_char.map { |c| Regexp.escape(c) }.map { |c| "#{c}[^#{c}]*#{c}" }.join('|')
|
|
|
|
|
executeRegexp = regexp.MustCompile(
|
|
|
|
|
`(?si)[:+](execute(?:-multi|-silent)?|reload|preview|change-prompt|change-preview-window|change-preview|(?:re|un)bind):.+|[:+](execute(?:-multi|-silent)?|reload|preview|change-prompt|change-preview-window|change-preview|(?:re|un)bind)(\([^)]*\)|\[[^\]]*\]|~[^~]*~|![^!]*!|@[^@]*@|\#[^\#]*\#|\$[^\$]*\$|%[^%]*%|\^[^\^]*\^|&[^&]*&|\*[^\*]*\*|;[^;]*;|/[^/]*/|\|[^\|]*\|)`)
|
|
|
|
|
`(?si)[:+](execute(?:-multi|-silent)?|reload|preview|change-query|change-prompt|change-preview-window|change-preview|(?:re|un)bind):.+|[:+](execute(?:-multi|-silent)?|reload|preview|change-query|change-prompt|change-preview-window|change-preview|(?:re|un)bind)(\([^)]*\)|\[[^\]]*\]|~[^~]*~|![^!]*!|@[^@]*@|\#[^\#]*\#|\$[^\$]*\$|%[^%]*%|\^[^\^]*\^|&[^&]*&|\*[^\*]*\*|;[^;]*;|/[^/]*/|\|[^\|]*\|)`)
|
|
|
|
|
splitRegexp = regexp.MustCompile("[,:]+")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -912,6 +912,8 @@ func parseKeymap(keymap map[tui.Event][]*action, str string) {
|
|
|
|
|
prefix = symbol + "unbind"
|
|
|
|
|
} else if strings.HasPrefix(src[1:], "rebind") {
|
|
|
|
|
prefix = symbol + "rebind"
|
|
|
|
|
} else if strings.HasPrefix(src[1:], "change-query") {
|
|
|
|
|
prefix = symbol + "change-query"
|
|
|
|
|
} else if strings.HasPrefix(src[1:], "change-prompt") {
|
|
|
|
|
prefix = symbol + "change-prompt"
|
|
|
|
|
} else if src[len(prefix)] == '-' {
|
|
|
|
@ -1121,6 +1123,8 @@ func parseKeymap(keymap map[tui.Event][]*action, str string) {
|
|
|
|
|
offset = len("change-preview")
|
|
|
|
|
case actChangePrompt:
|
|
|
|
|
offset = len("change-prompt")
|
|
|
|
|
case actChangeQuery:
|
|
|
|
|
offset = len("change-query")
|
|
|
|
|
case actUnbind:
|
|
|
|
|
offset = len("unbind")
|
|
|
|
|
case actRebind:
|
|
|
|
@ -1180,6 +1184,8 @@ func isExecuteAction(str string) actionType {
|
|
|
|
|
return actChangePreview
|
|
|
|
|
case "change-prompt":
|
|
|
|
|
return actChangePrompt
|
|
|
|
|
case "change-query":
|
|
|
|
|
return actChangeQuery
|
|
|
|
|
case "execute":
|
|
|
|
|
return actExecute
|
|
|
|
|
case "execute-silent":
|
|
|
|
|