Skip to content

Commit

Permalink
Fixed exiting selection on CursorDown on the bottom (like PageDown)
Browse files Browse the repository at this point in the history
  • Loading branch information
semirke committed Dec 8, 2023
1 parent 82c8533 commit b345ec7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/action/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,15 @@ func (h *BufPane) CursorUp() bool {

// CursorDown moves the cursor down
func (h *BufPane) CursorDown() bool {
h.Cursor.Deselect(true)
h.MoveCursorDown(1)
if h.Cursor.HasSelection() {
h.Cursor.Loc = h.Cursor.CurSelection[1]
h.Cursor.ResetSelection()
h.Cursor.StoreVisualX()

// h.Cursor.Deselect(true)
} else {
h.MoveCursorDown(1)
}
h.Relocate()
return true
}
Expand Down

0 comments on commit b345ec7

Please sign in to comment.