git-gui: fix multi selected file operation
authorBert Wesarg <bert.wesarg@googlemail.com>
Fri, 14 Oct 2011 08:19:26 +0000 (10:19 +0200)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Tue, 18 Oct 2011 08:10:51 +0000 (09:10 +0100)
When staging a selection of files using Shift-Click to choose a range
of files then using Ctrl-T or the Stage To Commit menu item will stage
all the selected files. However if a non-sequential range is selected
using Ctrl-Click then all but the first name selected gets staged. This
commit fixes this to properly stage all selected files by explicitly
adding the path to the list before showing the diff.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh
index f8971603f77a495b253b5470f5546d51dd6efd14..e5dd8bc1f2ffb489f4b41470c3cbda5ff7ca4656 100755 (executable)
@@ -2474,6 +2474,7 @@ proc toggle_or_diff {w x y} {
                                [concat $after [list ui_ready]]
                }
        } else {
+               set selected_paths($path) 1
                show_diff $path $w $lno
        }
 }