diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2017-12-03 23:48:59 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-12-03 23:48:59 +0900 |
| commit | 9c47739c0edb1154aca6c1213b75d5e307bbc1db (patch) | |
| tree | ab2ce8281141a23656bd60d76211d0f9f6bc0dee /src | |
| parent | 04aa2992e7d7872c94c478f9795634592b7ba42f (diff) | |
| download | fzf-9c47739c0edb1154aca6c1213b75d5e307bbc1db.tar.gz | |
Fix panic when replace-query is triggered on empty result set
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 6881cdb5..e3caaad7 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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) } |
