Re: [PATCH 2/2] git-gui: ensure the file in the diff pane is in the list of selected files
- From
Pat Thoyts <patthoyts@users.sourceforge.net>
- Date
- Oct 3, 2016, 10:02 UTC
- Message-ID
- <87eg3xwy1n.fsf@red.patthoyts.tk>
- In-Reply-To
- <20160628085925.GE3710@pflmari>
Alex Riesen <alexander.riesen@cetitec.com> writes:
Show 26 quoted lines
>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>
>---
> lib/diff.tcl | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/lib/diff.tcl b/lib/diff.tcl
>index 0d56986..30bdd69 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} {These both look good. Applied with minor changes to the commit message for patch 1.
Thank you,
-- Pat Thoyts http://www.patthoyts.tk/ PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD