mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
Fix panic when replace-query is triggered on empty result set
This commit is contained in:
parent
04aa2992e7
commit
9c47739c0e
@ -1571,7 +1571,7 @@ func (t *Terminal) Loop() {
|
||||
case actPrintQuery:
|
||||
req(reqPrintQuery)
|
||||
case actReplaceQuery:
|
||||
if t.cy < t.merger.Length() {
|
||||
if t.cy >= 0 && t.cy < t.merger.Length() {
|
||||
t.input = t.merger.Get(t.cy).item.text.ToRunes()
|
||||
t.cx = len(t.input)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user