diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-11-25 12:08:03 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-11-25 12:08:03 +0000 |
commit | 19f990e497d73b727a68cebec9c094a9b25c4499 (patch) | |
tree | 38f61baece610b45be4bbda98f1e1c81bfa319c7 | |
parent | 331dafdbb852fa13837b7399f5fb2dcb7e1fb9fe (diff) | |
download | vim-19f990e497d73b727a68cebec9c094a9b25c4499.zip |
updated for version 7.2-305
-rw-r--r-- | src/screen.c | 14 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c index 5acc7dc40..79980e90f 100644 --- a/src/screen.c +++ b/src/screen.c @@ -323,6 +323,7 @@ update_screen(type) int did_one; #endif + /* Don't do anything if the screen structures are (not yet) valid. */ if (!screen_valid(TRUE)) return; @@ -342,7 +343,9 @@ update_screen(type) if (curwin->w_lines_valid == 0 && type < NOT_VALID) type = NOT_VALID; - if (!redrawing()) + /* Postpone the redrawing when it's not needed and when being called + * recursively. */ + if (!redrawing() || updating_screen) { redraw_later(type); /* remember type for next time */ must_redraw = type; @@ -582,6 +585,7 @@ static void update_finish __ARGS((void)); /* * Prepare for updating one or more windows. + * Caller must check for "updating_screen" already set to avoid recursiveness. */ static void update_prepare() @@ -663,7 +667,9 @@ update_debug_sign(buf, lnum) doit = TRUE; } - if (!doit) + /* Return when there is nothing to do or screen updating already + * happening. */ + if (!doit || updating_screen) return; /* update all windows that need updating */ @@ -696,6 +702,10 @@ update_debug_sign(buf, lnum) updateWindow(wp) win_T *wp; { + /* return if already busy updating */ + if (updating_screen) + return; + update_prepare(); #ifdef FEAT_CLIPBOARD diff --git a/src/version.c b/src/version.c index d27eeb5d0..7efd43611 100644 --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 305, +/**/ 304, /**/ 303, |