mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-25 22:27:41 +00:00
parent
ab3937ee5a
commit
f37ccaa64f
@ -2130,7 +2130,8 @@ func (t *Terminal) Loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
toggle := func() bool {
|
toggle := func() bool {
|
||||||
if t.cy < t.merger.Length() && t.toggleItem(t.merger.Get(t.cy).item) {
|
current := t.currentItem()
|
||||||
|
if current != nil && t.toggleItem(current) {
|
||||||
req(reqInfo)
|
req(reqInfo)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -2241,8 +2242,9 @@ func (t *Terminal) Loop() {
|
|||||||
case actRefreshPreview:
|
case actRefreshPreview:
|
||||||
refreshPreview(t.previewOpts.command)
|
refreshPreview(t.previewOpts.command)
|
||||||
case actReplaceQuery:
|
case actReplaceQuery:
|
||||||
if t.cy >= 0 && t.cy < t.merger.Length() {
|
current := t.currentItem()
|
||||||
t.input = t.merger.Get(t.cy).item.text.ToRunes()
|
if current != nil {
|
||||||
|
t.input = current.text.ToRunes()
|
||||||
t.cx = len(t.input)
|
t.cx = len(t.input)
|
||||||
}
|
}
|
||||||
case actAbort:
|
case actAbort:
|
||||||
|
Loading…
Reference in New Issue
Block a user