From: Shawn O. Pearce Date: Thu, 25 Jan 2007 01:39:30 +0000 (-0500) Subject: git-gui: Only allow Refresh in diff context menu when we have a diff. X-Git-Tag: gitgui-0.6.0~58 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86773d9bfc6124dec7b33094103f4819684bc4ae;p=git.git git-gui: Only allow Refresh in diff context menu when we have a diff. There is no reason to attempt refreshing an empty diff viewer, so the Refresh option of our diff context menu should be disabled when there is no diff currently shown. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index 79f980c47..b9e3d563e 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -4261,6 +4261,7 @@ $ctxm add command \ -label {Refresh} \ -font font_ui \ -command reshow_diff +lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state] $ctxm add command \ -label {Copy} \ -font font_ui \