mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-17 21:43:50 -07:00
Do not match jump labels beyond the screen limit
This commit is contained in:
@@ -1155,7 +1155,7 @@ func (t *Terminal) Loop() {
|
|||||||
changed = string(previousInput) != string(t.input)
|
changed = string(previousInput) != string(t.input)
|
||||||
} else {
|
} else {
|
||||||
if mapkey == C.Rune {
|
if mapkey == C.Rune {
|
||||||
if idx := strings.IndexRune(t.jumpLabels, event.Char); idx >= 0 {
|
if idx := strings.IndexRune(t.jumpLabels, event.Char); idx >= 0 && idx < t.maxItems() && idx < t.merger.Length() {
|
||||||
t.cy = idx + t.offset
|
t.cy = idx + t.offset
|
||||||
if t.jumping == jumpAcceptEnabled {
|
if t.jumping == jumpAcceptEnabled {
|
||||||
req(reqClose)
|
req(reqClose)
|
||||||
|
Reference in New Issue
Block a user