Skip to content

Commit 86773d9

Browse files
committed
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 <[email protected]>
1 parent bb816c5 commit 86773d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-gui.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4261,6 +4261,7 @@ $ctxm add command \
42614261
-label {Refresh} \
42624262
-font font_ui \
42634263
-command reshow_diff
4264+
lappend diff_actions [list $ctxm entryconf [$ctxm index last] -state]
42644265
$ctxm add command \
42654266
-label {Copy} \
42664267
-font font_ui \

0 commit comments

Comments
 (0)