From 1b50aff0c696e12f95fb04ec445d3f8471ae6dec Mon Sep 17 00:00:00 2001 From: "Luke I. Wilson" Date: Fri, 2 Apr 2021 15:05:59 -0500 Subject: [PATCH] Main: fix cut selection deleting selection before copying. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c08347e..368052f 100644 --- a/main.go +++ b/main.go @@ -287,11 +287,11 @@ func main() { bytes := te.GetSelectedBytes() var err error if len(bytes) > 0 { // If something is selected... - te.Delete(false) // Delete the selection err = ClipWrite(string(bytes)) // Add the selectedStr to clipboard if err != nil { showErrorDialog("Clipboard Failure", fmt.Sprintf("%v", err), nil) } + te.Delete(false) // Delete selection } if err == nil { // Prevent hiding error dialog changeFocus(tabContainer)