Skip to content

Commit a0a0c68

Browse files
ar-cetitecpatthoyts
authored andcommitted
git-gui: ensure the file in the diff pane is in the list of selected files
It is very confusing that the file which diff is displayed is marked as selected, but it is not in fact selected (that means the array of selected files does not include the file in question). Fixing this also improves the use of $FILENAMES in custom defined tools: one does not have to click the file in the list to make it selected. Signed-off-by: Alex Riesen <[email protected]> Signed-off-by: Pat Thoyts <[email protected]>
1 parent 52d196a commit a0a0c68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/diff.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
127127
} else {
128128
start_show_diff $cont_info
129129
}
130+
131+
global current_diff_path selected_paths
132+
set selected_paths($current_diff_path) 1
130133
}
131134

132135
proc show_unmerged_diff {cont_info} {

0 commit comments

Comments
 (0)