Skip to content

Commit 2345272

Browse files
committed
git-gui: schedule rescan after actions triggered by mouse clicks
A mouse click on a UI element of Git GUI should trigger that action. This does not always happen, in particluar, when the same mouse click also activiates the Git GUI main window. In this case, the auto-rescan is triggered first, which as a side-effect inhibits many operations that should have happened otherwise. Do not let the auto-rescan have that much priority. For example, when an entry in the file list is clicked, that entry's diff should be computed. But it isn't, because the rescan has taken over and clogs the command execution. Signed-off-by: Johannes Sixt <j6t@kdbg.org>
1 parent 1dcce5d commit 2345272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-gui.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4009,7 +4009,7 @@ bind . <Alt-Key-3> {focus $::ui_diff}
40094009
bind . <Alt-Key-4> {focus $::ui_comm}
40104010
40114011
if {[is_config_true gui.autorescan]} {
4012-
bind . <FocusIn> { if {"%W" eq "."} do_rescan }
4012+
bind . <FocusIn> { if {"%W" eq "."} { after idle do_rescan } }
40134013
}
40144014
40154015
set file_lists_last_clicked($ui_index) {}

0 commit comments

Comments
 (0)