From 9270f17378f098312e6ca48cba72153e6c717dcd Mon Sep 17 00:00:00 2001 From: Ryan Westlund Date: Fri, 24 Sep 2021 21:39:58 +0000 Subject: [PATCH] Fix #1943: 'Duplicated line' message being wrong (#2219) --- internal/action/actions.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/action/actions.go b/internal/action/actions.go index 08bd4c72..04520bab 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -1083,7 +1083,9 @@ func (h *BufPane) Cut() bool { // DuplicateLine duplicates the current line or selection func (h *BufPane) DuplicateLine() bool { + var infoMessage = "Duplicated line" if h.Cursor.HasSelection() { + infoMessage = "Duplicated selection" h.Buf.Insert(h.Cursor.CurSelection[1], string(h.Cursor.GetSelection())) } else { h.Cursor.End() @@ -1091,7 +1093,7 @@ func (h *BufPane) DuplicateLine() bool { // h.Cursor.Right() } - InfoBar.Message("Duplicated line") + InfoBar.Message(infoMessage) h.Relocate() return true }