Do not match jump labels beyond the screen limit
This commit is contained in:
parent
e53535cc61
commit
13330738b8
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user