diff --git a/internal/action/actions.go b/internal/action/actions.go index b0a959ba..9e9cb8b8 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -1242,11 +1242,13 @@ func (h *BufPane) CutLine() bool { if nlines == 0 { return false } + totalLines := nlines if h.freshClip && time.Since(h.lastCutTime) < 10*time.Second { if clip, err := clipboard.Read(clipboard.ClipboardReg); err != nil { InfoBar.Error(err) } else { clipboard.WriteMulti(clip+string(h.Cursor.GetSelection()), clipboard.ClipboardReg, h.Cursor.Num, h.Buf.NumCursors()) + totalLines = strings.Count(clip, "\n") + nlines } } else { h.Copy() @@ -1256,8 +1258,8 @@ func (h *BufPane) CutLine() bool { h.Cursor.DeleteSelection() h.Cursor.ResetSelection() h.Cursor.StoreVisualX() - if nlines > 1 { - InfoBar.Message(fmt.Sprintf("Cut %d lines", nlines)) + if totalLines > 1 { + InfoBar.Message(fmt.Sprintf("Cut %d lines", totalLines)) } else { InfoBar.Message("Cut line") }