mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-04 15:10:27 +00:00
Fix cursor position change after CopyLine command (#2353)
This commit is contained in:
parent
091fa9091d
commit
ce2d186543
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue