From 5ce543002db00eb41c5ab1d2892027372d43ee5b Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 2 Jun 2014 20:39:50 +0200 Subject: [PATCH] fix cut with empty selection --- AppKit/CPTextView/CPTextView.j | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index e256fb413..acb5c11f0 100755 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -1466,6 +1466,11 @@ var kDelegateRespondsTo_textShouldBeginEditing - (void)cut:(id)sender { + var selectedRange = [self selectedRange]; + + if (selectedRange.length < 1) + return; + [self copy:sender]; [self deleteBackward:sender] }