]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.305
- new
[packages/vim.git] / 7.2.305
CommitLineData
e40e3b19
AG
1To: vim-dev@vim.org
2Subject: Patch 7.2.305
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.305
11Problem: Recursively redrawing causes a memory leak. (Dominique Pelle)
12Solution: Disallow recursive screen updating.
13Files: src/screen.c
14
15
16*** ../vim-7.2.304/src/screen.c 2009-11-11 17:07:25.000000000 +0100
17--- src/screen.c 2009-11-17 16:30:53.000000000 +0100
18***************
19*** 323,328 ****
20--- 323,329 ----
21 int did_one;
22 #endif
23
24+ /* Don't do anything if the screen structures are (not yet) valid. */
25 if (!screen_valid(TRUE))
26 return;
27
28***************
29*** 342,348 ****
30 if (curwin->w_lines_valid == 0 && type < NOT_VALID)
31 type = NOT_VALID;
32
33! if (!redrawing())
34 {
35 redraw_later(type); /* remember type for next time */
36 must_redraw = type;
37--- 343,351 ----
38 if (curwin->w_lines_valid == 0 && type < NOT_VALID)
39 type = NOT_VALID;
40
41! /* Postpone the redrawing when it's not needed and when being called
42! * recursively. */
43! if (!redrawing() || updating_screen)
44 {
45 redraw_later(type); /* remember type for next time */
46 must_redraw = type;
47***************
48*** 582,587 ****
49--- 585,591 ----
50
51 /*
52 * Prepare for updating one or more windows.
53+ * Caller must check for "updating_screen" already set to avoid recursiveness.
54 */
55 static void
56 update_prepare()
57***************
58*** 663,669 ****
59 doit = TRUE;
60 }
61
62! if (!doit)
63 return;
64
65 /* update all windows that need updating */
66--- 667,675 ----
67 doit = TRUE;
68 }
69
70! /* Return when there is nothing to do or screen updating already
71! * happening. */
72! if (!doit || updating_screen)
73 return;
74
75 /* update all windows that need updating */
76***************
77*** 696,701 ****
78--- 702,711 ----
79 updateWindow(wp)
80 win_T *wp;
81 {
82+ /* return if already busy updating */
83+ if (updating_screen)
84+ return;
85+
86 update_prepare();
87
88 #ifdef FEAT_CLIPBOARD
89*** ../vim-7.2.304/src/version.c 2009-11-25 12:38:49.000000000 +0100
90--- src/version.c 2009-11-25 13:01:48.000000000 +0100
91***************
92*** 683,684 ****
93--- 683,686 ----
94 { /* Add new patch number below this line */
95+ /**/
96+ 305,
97 /**/
98
99--
100If the Universe is constantly expanding, why can't I ever find a parking space?
101
102 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
103/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
104\\\ download, build and distribute -- http://www.A-A-P.org ///
105 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.050488 seconds and 4 git commands to generate.