diff options
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-x | git-gui.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh index b3c14acbd..3fc254c37 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2502,6 +2502,19 @@ proc toggle_or_diff {mode w args} { set pos [split [$w index @$x,$y] .] foreach {lno col} $pos break } else { + if {$mode eq "toggle"} { + if {$w eq $ui_workdir} { + do_add_selection + set last_clicked {} + return + } + if {$w eq $ui_index} { + do_unstage_selection + set last_clicked {} + return + } + } + if {$last_clicked ne {}} { set lno [lindex $last_clicked 1] } else { |