diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-01-09 15:33:04 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-01-09 11:02:40 -0800 |
commit | 76756d67061076c046973bff2089ad49f5dc2eb6 (patch) | |
tree | b83aa550514b9f2a933604730bff0db6327f2af9 | |
parent | 2cd9179c14dc830247a84a602caac42afa0fcf8f (diff) | |
download | git-76756d67061076c046973bff2089ad49f5dc2eb6.tar.gz git-76756d67061076c046973bff2089ad49f5dc2eb6.tar.xz |
git-gui: allow Ctrl+T to toggle multiple paths
It is possible to select multiple files in the "Unstaged Changes" and
the "Staged Changes" lists. But when hitting Ctrl+T, surprisingly only
one entry is handled, not all selected ones.
Let's just use the same code path as for the "Stage To Commit" and the
"Unstage From Commit" menu items.
This fixes https://github.com/git-for-windows/git/issues/1012
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-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 { |