Main: fix cut selection deleting selection before copying.
This commit is contained in:
parent
d1dd389dba
commit
1b50aff0c6
2
main.go
2
main.go
@ -287,11 +287,11 @@ func main() {
|
|||||||
bytes := te.GetSelectedBytes()
|
bytes := te.GetSelectedBytes()
|
||||||
var err error
|
var err error
|
||||||
if len(bytes) > 0 { // If something is selected...
|
if len(bytes) > 0 { // If something is selected...
|
||||||
te.Delete(false) // Delete the selection
|
|
||||||
err = ClipWrite(string(bytes)) // Add the selectedStr to clipboard
|
err = ClipWrite(string(bytes)) // Add the selectedStr to clipboard
|
||||||
if err != nil {
|
if err != nil {
|
||||||
showErrorDialog("Clipboard Failure", fmt.Sprintf("%v", err), nil)
|
showErrorDialog("Clipboard Failure", fmt.Sprintf("%v", err), nil)
|
||||||
}
|
}
|
||||||
|
te.Delete(false) // Delete selection
|
||||||
}
|
}
|
||||||
if err == nil { // Prevent hiding error dialog
|
if err == nil { // Prevent hiding error dialog
|
||||||
changeFocus(tabContainer)
|
changeFocus(tabContainer)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user