diff --git a/internal/action/actions.go b/internal/action/actions.go index c1a96e33..ec77ba5f 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -293,7 +293,6 @@ func (h *BufPane) CursorLeft() bool { func (h *BufPane) CursorRight() bool { if h.Cursor.HasSelection() { h.Cursor.Deselect(false) - h.Cursor.Right() } else { tabstospaces := h.Buf.Settings["tabstospaces"].(bool) tabmovement := h.Buf.Settings["tabmovement"].(bool) diff --git a/internal/buffer/cursor.go b/internal/buffer/cursor.go index d849f836..f6eb91af 100644 --- a/internal/buffer/cursor.go +++ b/internal/buffer/cursor.go @@ -193,7 +193,7 @@ func (c *Cursor) Deselect(start bool) { if start { c.Loc = c.CurSelection[0] } else { - c.Loc = c.CurSelection[1].Move(-1, c.buf) + c.Loc = c.CurSelection[1] } c.ResetSelection() c.StoreVisualX()