Skip to content
Myr

page-up/down: undo last up/down if items are skipped

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #4069

authored by Junegunn Choi · committed by Junegunn Choi · parent 9c94f9c · Browse files · 1 file+8 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−5 removed

  • other:+8 added−5 removed

1 file+8 added−5 removed

modified:src/terminal.go+8 added-5 removed
4466 unmodified lines
4467 }4468 }4469 }44704471 for ; linesToMove > 0; linesToMove-- {4472 cy := t.cy4471 for i := 0; i < linesToMove; i++ {4472 cy, offset := t.cy, t.offset4473 t.vset(cy + direction)4474 t.constrain()4475 if cy == t.cy ||4476 direction > 0 && t.offset >= maxOffset ||4477 direction < 0 && t.offset <= minOffset {4475 if cy == t.cy {4476 break4477 }4478 if i > 0 && (direction > 0 && t.offset > maxOffset ||4479 direction < 0 && t.offset < minOffset) {4480 t.cy, t.offset = cy, offset4481 break4482 }4483 }4484 req(reqList)4485 case actOffsetUp, actOffsetDown:4486 diff := 1
665 unmodified lines