@matheusbsbs / matheus-bagliano / commits / bf516ecaac
Fork 0

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

An "Application Error" was raised when trying to delete text from the commit message field when no text was selected. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Markus Heidelberg committed Mar 29, 2009 at 15:29 UTC bf516ecaac4d7fca840f55e2534066227aa639be
1 file changed +1 -1
git-gui.sh
+1 -1
@@ -2944,7 +2944,7 @@ $ctxm add command \
2944 -command {tk_textPaste $ui_comm}
2945 $ctxm add command \
2946 -label [mc Delete] \
2947 - -command {$ui_comm delete sel.first sel.last}
2947 + -command {catch {$ui_comm delete sel.first sel.last}}
2948 $ctxm add separator
2949 $ctxm add command \
2950 -label [mc "Select All"] \