Fix cursor position change after CopyLine command (#2353)

This commit is contained in:
Lincoln Júnior
2022-07-24 18:09:14 -03:00
committed by GitHub
parent 091fa9091d
commit ce2d186543

View File

@@ -1047,12 +1047,14 @@ func (h *BufPane) CopyLine() bool {
if h.Cursor.HasSelection() {
return false
}
origLoc := h.Cursor.Loc
h.Cursor.SelectLine()
h.Cursor.CopySelection(clipboard.ClipboardReg)
h.freshClip = true
InfoBar.Message("Copied line")
h.Cursor.Deselect(true)
h.Cursor.Loc = origLoc
h.Relocate()
return true
}