Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git-gui: fix deleting from the context menu with empty selection

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:46:31

Markus Heidelberg [off-list ref] wrote:
An "Application Error" was raised when trying to delete text from the
commit message field when no text was selected.
Thanks.
quoted hunk
diff --git a/git-gui.sh b/git-gui.sh
index 2f1f305..b3aa732 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2944,7 +2944,7 @@ $ctxm add command \
 	-command {tk_textPaste $ui_comm}
 $ctxm add command \
 	-label [mc Delete] \
-	-command {$ui_comm delete sel.first sel.last}
+	-command {catch {$ui_comm delete sel.first sel.last}}
 $ctxm add separator
 $ctxm add command \
 	-label [mc "Select All"] \
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help