Code

Mention added watch file in changelog.
[pkg-tig.git] / debian / patches / splitview.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## splitview.dpatch by Jonas Fonseca <fonseca@diku.dk>
3 ##
4 ## DP: Never split the tree view when opening another tree view.
5 ## DP:
6 ## DP: The resulting bogus display[] state ment that the blob view was not
7 ## DP: initialized causing segmentation faults in the redrawing code.
8 ## DP:
9 ## DP: Reported by Alexey Tourbin <at@altlinux.ru>, Josh Triplett
10 ## DP: <josh@freedesktop.org> and Jamey Sharp <sharpone@debian.org>
12 @DPATCH@
14 diff --git a/tig.c b/tig.c
15 index fcfbc43..3b320e6 100644
16 --- a/tig.c
17 +++ b/tig.c
18 @@ -2580,7 +2580,7 @@ tree_read(struct view *view, char *text)
19  static bool
20  tree_enter(struct view *view, struct line *line)
21  {
22 -       enum open_flags flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT;
23 +       enum open_flags flags;
24         enum request request;
25  
26         switch (line->type) {
27 @@ -2610,11 +2610,12 @@ tree_enter(struct view *view, struct lin
28  
29                 /* Trees and subtrees share the same ID, so they are not not
30                  * unique like blobs. */
31 -               flags |= OPEN_RELOAD;
32 +               flags = OPEN_RELOAD;
33                 request = REQ_VIEW_TREE;
34                 break;
35  
36         case LINE_TREE_FILE:
37 +               flags = display[0] == view ? OPEN_SPLIT : OPEN_DEFAULT;
38                 request = REQ_VIEW_BLOB;
39                 break;
40