Always allow preview/execute commands with no placeholder expressions

Fix #2017
This commit is contained in:
Junegunn Choi 2020-09-29 11:31:28 +09:00
parent f8ae1786dd
commit 6f9663da62
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 2 additions and 2 deletions

View File

@ -1553,8 +1553,8 @@ func (t *Terminal) currentItem() *Item {
func (t *Terminal) buildPlusList(template string, forcePlus bool) (bool, []*Item) {
current := t.currentItem()
_, plus, query := hasPreviewFlags(template)
if !(query && len(t.input) > 0 || (forcePlus || plus) && len(t.selected) > 0) {
slot, plus, query := hasPreviewFlags(template)
if !(!slot || query && len(t.input) > 0 || (forcePlus || plus) && len(t.selected) > 0) {
return current != nil, []*Item{current, current}
}