diff options
-rwxr-xr-x | git-gui.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh index 2686c1b8f0..d5517b921d 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2416,15 +2416,16 @@ $ctxm add separator $ctxm add command -label {Options...} \ -command do_options proc popup_diff_menu {ctxm x y X Y} { - global current_diff_path + global current_diff_path file_states set ::cursorX $x set ::cursorY $y if {$::ui_index eq $::current_diff_side} { $ctxm entryconf $::ui_diff_applyhunk \ -state normal \ -label {Unstage Hunk From Commit} - } elseif {![info exists file_states($current_diff_path)] - || {_O} eq [lindex $file_states($::current_diff_path) 0]} { + } elseif {$current_diff_path eq {} + || ![info exists file_states($current_diff_path)] + || {_O} eq [lindex $file_states($current_diff_path) 0]} { $ctxm entryconf $::ui_diff_applyhunk \ -state disabled \ -label {Stage Hunk For Commit} |