diff --git a/internal/action/actions.go b/internal/action/actions.go index 805bf739..94fce619 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -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"