diff --git a/internal/action/actions.go b/internal/action/actions.go index c3b4b150..cca43bfd 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -1243,7 +1243,7 @@ func (h *BufPane) CutLine() bool { return false } totalLines := nlines - if h.freshClip && time.Since(h.lastCutTime) < 10*time.Second { + if h.freshClip { if clip, err := clipboard.Read(clipboard.ClipboardReg); err != nil { InfoBar.Error(err) return false @@ -1255,7 +1255,6 @@ func (h *BufPane) CutLine() bool { h.Cursor.CopySelection(clipboard.ClipboardReg) } h.freshClip = true - h.lastCutTime = time.Now() h.Cursor.DeleteSelection() h.Cursor.ResetSelection() h.Cursor.StoreVisualX() diff --git a/internal/action/bufpane.go b/internal/action/bufpane.go index 4d17816e..4f213751 100644 --- a/internal/action/bufpane.go +++ b/internal/action/bufpane.go @@ -231,10 +231,6 @@ type BufPane struct { lastClickTime time.Time lastLoc buffer.Loc - // lastCutTime stores when the last ctrl+k was issued. - // It is used for clearing the clipboard to replace it with fresh cut lines. - lastCutTime time.Time - // freshClip returns true if one or more lines have been cut to the clipboard // and have never been pasted yet. freshClip bool