Skip to content

Commit 76756d6

Browse files
dschogitster
authored andcommitted
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 #1012 Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2cd9179 commit 76756d6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

git-gui.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,6 +2502,19 @@ proc toggle_or_diff {mode w args} {
25022502
set pos [split [$w index @$x,$y] .]
25032503
foreach {lno col} $pos break
25042504
} else {
2505+
if {$mode eq "toggle"} {
2506+
if {$w eq $ui_workdir} {
2507+
do_add_selection
2508+
set last_clicked {}
2509+
return
2510+
}
2511+
if {$w eq $ui_index} {
2512+
do_unstage_selection
2513+
set last_clicked {}
2514+
return
2515+
}
2516+
}
2517+
25052518
if {$last_clicked ne {}} {
25062519
set lno [lindex $last_clicked 1]
25072520
} else {

0 commit comments

Comments
 (0)