Skip to content

Commit 3f01f30

Browse files
committed
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 git-for-windows#1012 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent c227a5f commit 3f01f30

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

git-gui/git-gui.sh

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

0 commit comments

Comments
 (0)