Fix mouse event above fzf finder

Fix #2949
This commit is contained in:
Junegunn Choi 2022-11-18 20:31:12 +09:00
parent 1bebd6f4f5
commit a38b63be18
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ CHANGELOG
0.35.1
------
- Fixed a bug where fzf with `--tiebreak=chunk` crashes on inverse match query
- Fixed a bug where clicking above fzf would paste escape sequences
0.35.0
------

View File

@ -545,7 +545,7 @@ func (r *LightRenderer) mouseSequence(sz *int) Event {
t := atoi(elems[0], -1)
x := atoi(elems[1], -1) - 1
y := atoi(elems[2], -1) - 1 - r.yoffset
if t < 0 || x < 0 || y < 0 {
if t < 0 || x < 0 {
return Event{Invalid, 0, nil}
}
*sz += end + 1