From: Markus Heidelberg Date: Sun, 29 Mar 2009 14:29:23 +0000 (+0100) Subject: git-gui: fix deleting from the context menu with empty selection X-Git-Tag: v1.6.3-rc4~1^2~3^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf516ecaac4d7fca840f55e2534066227aa639be;p=git.git 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 Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index 2f1f30501..b3aa7325f 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"] \