]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.370
- new
[packages/vim.git] / 7.2.370
CommitLineData
8587d00a
AM
1To: vim-dev@vim.org
2Subject: Patch 7.2.370
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.370 (after 7.2.356)
11Problem: A redraw may cause folds to be closed.
12Solution: Revert part of the previous patch. Add a test. (Lech Lorens)
13Files: src/diff.c, src/fold.c, src/option.c, src/testdir/test45.in,
14 src/testdir/test45.ok
15
16
17*** ../vim-7.2.369/src/diff.c 2009-07-22 16:22:33.000000000 +0200
18--- src/diff.c 2010-02-24 14:31:12.000000000 +0100
19***************
20*** 1117,1142 ****
21 win_T *wp;
22 int addbuf; /* Add buffer to diff. */
23 {
24 wp->w_p_diff = TRUE;
25 wp->w_p_scb = TRUE;
26 wp->w_p_wrap = FALSE;
27 # ifdef FEAT_FOLDING
28! {
29! win_T *old_curwin = curwin;
30!
31! curwin = wp;
32! curbuf = curwin->w_buffer;
33! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff",
34 OPT_LOCAL|OPT_FREE, 0);
35! curwin = old_curwin;
36! curbuf = curwin->w_buffer;
37! wp->w_p_fdc = diff_foldcolumn;
38! wp->w_p_fen = TRUE;
39! wp->w_p_fdl = 0;
40! foldUpdateAll(wp);
41! /* make sure topline is not halfway a fold */
42! changed_window_setting_win(wp);
43! }
44 # endif
45 #ifdef FEAT_SCROLLBIND
46 if (vim_strchr(p_sbo, 'h') == NULL)
47--- 1117,1147 ----
48 win_T *wp;
49 int addbuf; /* Add buffer to diff. */
50 {
51+ # ifdef FEAT_FOLDING
52+ win_T *old_curwin = curwin;
53+
54+ /* close the manually opened folds */
55+ curwin = wp;
56+ newFoldLevel();
57+ curwin = old_curwin;
58+ # endif
59+
60 wp->w_p_diff = TRUE;
61 wp->w_p_scb = TRUE;
62 wp->w_p_wrap = FALSE;
63 # ifdef FEAT_FOLDING
64! curwin = wp;
65! curbuf = curwin->w_buffer;
66! set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff",
67 OPT_LOCAL|OPT_FREE, 0);
68! curwin = old_curwin;
69! curbuf = curwin->w_buffer;
70! wp->w_p_fdc = diff_foldcolumn;
71! wp->w_p_fen = TRUE;
72! wp->w_p_fdl = 0;
73! foldUpdateAll(wp);
74! /* make sure topline is not halfway a fold */
75! changed_window_setting_win(wp);
76 # endif
77 #ifdef FEAT_SCROLLBIND
78 if (vim_strchr(p_sbo, 'h') == NULL)
79*** ../vim-7.2.369/src/fold.c 2010-02-03 18:14:41.000000000 +0100
80--- src/fold.c 2010-02-24 13:09:04.000000000 +0100
81***************
82*** 854,865 ****
83 && fp->fd_top < bot)
84 {
85 fp->fd_small = MAYBE;
86-
87- /* Not sure if this is the right place to reset fd_flags (suggested by
88- * Lech Lorens). */
89- if (wp->w_foldinvalid)
90- fp->fd_flags = FD_LEVEL;
91-
92 ++fp;
93 }
94
95--- 854,859 ----
96*** ../vim-7.2.369/src/option.c 2010-02-11 17:02:04.000000000 +0100
97--- src/option.c 2010-02-24 13:09:44.000000000 +0100
98***************
99*** 6586,6592 ****
100--- 6586,6596 ----
101 || *curwin->w_p_fdm == NUL)
102 errmsg = e_invarg;
103 else
104+ {
105 foldUpdateAll(curwin);
106+ if (foldmethodIsDiff(curwin))
107+ newFoldLevel();
108+ }
109 }
110 # ifdef FEAT_EVAL
111 /* 'foldexpr' */
112*** ../vim-7.2.369/src/testdir/test45.in 2009-11-03 14:46:35.000000000 +0100
113--- src/testdir/test45.in 2010-02-24 13:02:39.000000000 +0100
114***************
115*** 36,41 ****
116--- 36,43 ----
117 k:call append("$", getline("."))
118 jAcommentstart \eAcommentend\e:set fdl=1
119 3j:call append("$", getline("."))
120+ :set fdl=0
121+ zO\fj:call append("$", getline("."))
122 :" test expression folding
123 :fun Flvl()
124 let l = getline(v:lnum)
125*** ../vim-7.2.369/src/testdir/test45.ok 2009-11-03 14:46:35.000000000 +0100
126--- src/testdir/test45.ok 2010-02-24 12:58:55.000000000 +0100
127***************
128*** 11,16 ****
129--- 11,17 ----
130 folding 9 ii
131 3 cc
132 7 gg
133+ 8 hh
134 expr 2
135 1
136 2
137*** ../vim-7.2.369/src/version.c 2010-02-24 13:59:09.000000000 +0100
138--- src/version.c 2010-02-24 14:28:20.000000000 +0100
139***************
140*** 683,684 ****
141--- 683,686 ----
142 { /* Add new patch number below this line */
143+ /**/
144+ 370,
145 /**/
146
147--
148MAN: Fetchez la vache!
149GUARD: Quoi?
150MAN: Fetchez la vache!
151 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
152
153 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
154/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
155\\\ download, build and distribute -- http://www.A-A-P.org ///
156 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.04642 seconds and 4 git commands to generate.