diff options
author | Elwardi <elwardifadeli@gmail.com> | 2021-07-17 19:18:41 +0100 |
---|---|---|
committer | Elwardi <elwardifadeli@gmail.com> | 2021-07-18 10:36:01 +0100 |
commit | 9daa47fb2df8b58a3edc82ed48687205c2bd85e9 (patch) | |
tree | d5f924faa9b27d7a809583b3df257da5a6de820c /pkg | |
parent | d18c8c8dc39fa028949470064dc9a596762f7f09 (diff) |
Add docs for menuFromCommand prompts
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/custom_commands.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/custom_commands.go b/pkg/gui/custom_commands.go index a17d30dd2..a07bd396b 100644 --- a/pkg/gui/custom_commands.go +++ b/pkg/gui/custom_commands.go @@ -179,11 +179,11 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand config.CustomCommand var candidates []string reg := regexp.MustCompile(filter) for _,str := range strings.Split(string(message), "\n"){ - cand := str + cand := "" if str != "" { for i := 1; i < (reg.NumSubexp()+1); i++ { - trim := reg.ReplaceAllString(str, "${"+fmt.Sprint(i)+"}") - cand = strings.Trim(cand, trim) + keep := reg.ReplaceAllString(str, "${"+fmt.Sprint(i)+"}") + cand += keep } candidates = append(candidates, cand) } |