]> git.pld-linux.org Git - packages/vim.git/blame - 7.1.045
- updated to 7.1.100
[packages/vim.git] / 7.1.045
CommitLineData
6577e359 1To: vim-dev@vim.org
2Subject: patch 7.1.045
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.1.045
11Problem: Unnecessary screen redrawing. (Jjgod Jiang)
12Solution: Reset "must_redraw" after clearing the screen.
13Files: src/screen.c
14
15
16*** ../vim-7.1.044/src/screen.c Thu Jul 26 22:55:11 2007
17--- src/screen.c Mon Jul 30 21:39:32 2007
18***************
19*** 331,336 ****
20--- 331,341 ----
21 {
22 if (type < must_redraw) /* use maximal type */
23 type = must_redraw;
24+
25+ /* must_redraw is reset here, so that when we run into some weird
26+ * reason to redraw while busy redrawing (e.g., asynchronous
27+ * scrolling), or update_topline() in win_update() will cause a
28+ * scroll, the screen will be redrawn later or in win_update(). */
29 must_redraw = 0;
30 }
31
32***************
33*** 1019,1024 ****
34--- 1024,1036 ----
35 type = VALID;
36 }
37
38+ /* Trick: we want to avoid clearning the screen twice. screenclear() will
39+ * set "screen_cleared" to TRUE. The special value MAYBE (which is still
40+ * non-zero and thus not FALSE) will indicate that screenclear() was not
41+ * called. */
42+ if (screen_cleared)
43+ screen_cleared = MAYBE;
44+
45 /*
46 * If there are no changes on the screen that require a complete redraw,
47 * handle three cases:
48***************
49*** 1220,1226 ****
50 mid_end = wp->w_height;
51 if (lastwin == firstwin)
52 {
53! screenclear();
54 #ifdef FEAT_WINDOWS
55 /* The screen was cleared, redraw the tab pages line. */
56 if (redraw_tabline)
57--- 1232,1242 ----
58 mid_end = wp->w_height;
59 if (lastwin == firstwin)
60 {
61! /* Clear the screen when it was not done by win_del_lines() or
62! * win_ins_lines() above, "screen_cleared" is FALSE or MAYBE
63! * then. */
64! if (screen_cleared != TRUE)
65! screenclear();
66 #ifdef FEAT_WINDOWS
67 /* The screen was cleared, redraw the tab pages line. */
68 if (redraw_tabline)
69***************
70*** 1228,1233 ****
71--- 1244,1256 ----
72 #endif
73 }
74 }
75+
76+ /* When win_del_lines() or win_ins_lines() caused the screen to be
77+ * cleared (only happens for the first window) or when screenclear()
78+ * was called directly above, "must_redraw" will have been set to
79+ * NOT_VALID, need to reset it here to avoid redrawing twice. */
80+ if (screen_cleared == TRUE)
81+ must_redraw = 0;
82 }
83 else
84 {
85*** ../vim-7.1.044/src/version.c Sun Jul 29 15:02:34 2007
86--- src/version.c Mon Jul 30 21:58:06 2007
87***************
88*** 668,669 ****
89--- 668,671 ----
90 { /* Add new patch number below this line */
91+ /**/
92+ 45,
93 /**/
94
95--
96Be thankful to be in a traffic jam, because it means you own a car.
97
98 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
99/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
100\\\ download, build and distribute -- http://www.A-A-P.org ///
101 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.118614 seconds and 4 git commands to generate.