Skip to content

Commit

Permalink
git-gui: allow Ctrl+T to toggle multiple paths
Browse files Browse the repository at this point in the history
This fixes #1012

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed May 30, 2017
1 parent 8b4e64d commit 759b4f1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2513,6 +2513,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 {
Expand Down

3 comments on commit 759b4f1

@daniel-da
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
So now CTRL+T and CTRL+U will act as the same, ie stage/unstage depending on focus.
For me it's a little bit confusing since in the Commit Menu we have CTRL+T as a shortcut for staging and CTRL+U for unstaging.
What do you think?

@dscho
Copy link
Member Author

@dscho dscho commented on 759b4f1 May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it's a little bit confusing since in the Commit Menu we have CTRL+T as a shortcut for staging and CTRL+U for unstaging.

Sure, I can see how that is confusing.

What do you think?

I think that this would be a splendid opportunity for somebody who finds this confusing to step in and patch the code and open a Pull Request.

That's what I think.

@daniel-da
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
2 weeks ago I've discovered tcl thing exists :)
I'll try to do my best to help on this thing (and by the way the CTRL-A)
Regards

Please sign in to comment.