Skip to content
Snippets Groups Projects
Unverified Commit 13330738 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

Do not match jump labels beyond the screen limit

parent e53535cc
No related branches found
No related tags found
No related merge requests found
......@@ -1155,7 +1155,7 @@ func (t *Terminal) Loop() {
changed = string(previousInput) != string(t.input)
} else {
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
if t.jumping == jumpAcceptEnabled {
req(reqClose)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment