aboutsummaryrefslogtreecommitdiff
path: root/lib/diff.tcl
diff options
context:
space:
mode:
authorAlex Riesen <alexander.riesen@cetitec.com>2016-06-28 10:59:25 +0200
committerPat Thoyts <patthoyts@users.sourceforge.net>2016-10-03 23:27:14 +0100
commita0a0c6838744ce51bcbb634f459e173e8be59c22 (patch)
tree9d465081bb8c1e7d85e1e426f5ec7ff39dbd88d1 /lib/diff.tcl
parent52d196af6a5cb8441028914876a60ecec6c464e7 (diff)
downloadgit-a0a0c6838744ce51bcbb634f459e173e8be59c22.tar.gz
git-a0a0c6838744ce51bcbb634f459e173e8be59c22.tar.xz
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 <alexander.riesen@cetitec.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'lib/diff.tcl')
-rw-r--r--lib/diff.tcl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 0d5698621..30bdd691e 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -127,6 +127,9 @@ proc show_diff {path w {lno {}} {scroll_pos {}} {callback {}}} {
} else {
start_show_diff $cont_info
}
+
+ global current_diff_path selected_paths
+ set selected_paths($current_diff_path) 1
}
proc show_unmerged_diff {cont_info} {