diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-01-21 22:20:26 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-01-21 22:20:26 +0900 |
commit | b077f6821d4f27ac9e4f1acd4619139ba4a14d14 (patch) | |
tree | 3ad94bfb56d3d144f65f3423630524fe06395022 | |
parent | a79de11af78d98f3f1931870d2866012cc6e962a (diff) |
Action argument in enclosed form should allow new lines
Close #3138
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | src/options.go | 2 | ||||
-rw-r--r-- | src/options_test.go | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ca63072..e1993845 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ CHANGELOG ========= +0.36.1 +------ +- Bug fixes and improvements + 0.36.0 ------ - Added `--listen=HTTP_PORT` option to start HTTP server. It allows external diff --git a/src/options.go b/src/options.go index fd160367..39b1b0e1 100644 --- a/src/options.go +++ b/src/options.go @@ -954,7 +954,7 @@ Loop: ce = regexp.QuoteMeta(ce) // @$ or @+ - loc = regexp.MustCompile(fmt.Sprintf(`^%s.*?(%s[+,]|%s$)`, cs, ce, ce)).FindStringIndex(action) + loc = regexp.MustCompile(fmt.Sprintf(`(?s)^%s.*?(%s[+,]|%s$)`, cs, ce, ce)).FindStringIndex(action) if loc == nil { masked += action break diff --git a/src/options_test.go b/src/options_test.go index 8754716c..4e300db7 100644 --- a/src/options_test.go +++ b/src/options_test.go @@ -268,7 +268,7 @@ func TestBind(t *testing.T) { } parseKeymap(keymap, "ctrl-a:kill-line,ctrl-b:toggle-sort+up+down,c:page-up,alt-z:page-down,"+ - "f1:execute(ls {+})+abort+execute(echo {+})+select-all,f2:execute/echo {}, {}, {}/,f3:execute[echo '({})'],f4:execute;less {};,"+ + "f1:execute(ls {+})+abort+execute(echo \n{+})+select-all,f2:execute/echo {}, {}, {}/,f3:execute[echo '({})'],f4:execute;less {};,"+ "alt-a:execute-Multi@echo (,),[,],/,:,;,%,{}@,alt-b:execute;echo (,),[,],/,:,@,%,{};,"+ "x:Execute(foo+bar),X:execute/bar+baz/"+ ",f1:+first,f1:+top"+ |