From 9f7bdb109b7984501254c94d4808efdab1fd8657 Mon Sep 17 00:00:00 2001 From: Dmytro Maluka Date: Sun, 9 Jun 2024 12:28:32 +0200 Subject: [PATCH] Cosmetic change: move Cut above CutLine --- internal/action/actions.go | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) 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"