Skip to contentSkip to conversation

git-gui: fix deleting from the context menu with empty selection

PATCH Shawn O. Pearce 1 participant 1 message Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 2 lines · Markus Heidelberg

An "Application Error" was raised when trying to delete text from the commit message field when no text was selected.

Thanks.

Quoted 13 lines
git-gui.sh +1 -1
index 2f1f305..b3aa732 100755
@@ -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"] \
Signature · 1 line
Shawn.