Cosmetic change: move Cut above CutLine

This commit is contained in:
Dmytro Maluka
2024-06-09 12:28:32 +02:00
parent c1bbd7b041
commit 9f7bdb109b

View File

@@ -1193,6 +1193,21 @@ func (h *BufPane) CopyLine() bool {
return true
}
// Cut the selection to the system clipboard
func (h *BufPane) Cut() bool {
if !h.Cursor.HasSelection() {
return false
}
h.Cursor.CopySelection(clipboard.ClipboardReg)
h.Cursor.DeleteSelection()
h.Cursor.ResetSelection()
h.freshClip = true
InfoBar.Message("Cut selection")
h.Relocate()
return true
}
// CutLine cuts the current line to the clipboard
func (h *BufPane) CutLine() bool {
h.Cursor.SelectLine()
@@ -1218,21 +1233,6 @@ func (h *BufPane) CutLine() bool {
return true
}
// Cut the selection to the system clipboard
func (h *BufPane) Cut() bool {
if !h.Cursor.HasSelection() {
return false
}
h.Cursor.CopySelection(clipboard.ClipboardReg)
h.Cursor.DeleteSelection()
h.Cursor.ResetSelection()
h.freshClip = true
InfoBar.Message("Cut selection")
h.Relocate()
return true
}
// DuplicateLine duplicates the current line or selection
func (h *BufPane) DuplicateLine() bool {
var infoMessage = "Duplicated line"