diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-12 15:37:13 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-12 15:37:13 +0200 |
commit | 847a5d69a826c02a7cb8a14884f3fef69d74fed7 (patch) | |
tree | 163faa5d22eb2fbcec4ecd8877b49c93cd1e00d7 /src | |
parent | 1072768b919efd1dd3fe28d58b24274cb92ad098 (diff) | |
download | vim-git-847a5d69a826c02a7cb8a14884f3fef69d74fed7.tar.gz |
patch 8.1.1664: GUI resize may cause changing Rows at a bad timev8.1.1664
Problem: GUI resize may cause changing Rows at a bad time. (Dominique
Pelle)
Solution: Postpone resizing while updating the screen.
Diffstat (limited to 'src')
-rw-r--r-- | src/term.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c index afa622e45..f1ccfcbfa 100644 --- a/src/term.c +++ b/src/term.c @@ -3425,11 +3425,15 @@ set_shellsize(int width, int height, int mustset) if (State == HITRETURN || State == SETWSIZE) { - /* postpone the resizing */ + // postpone the resizing State = SETWSIZE; return; } + if (updating_screen) + // resizing while in update_screen() may cause a crash + return; + /* curwin->w_buffer can be NULL when we are closing a window and the * buffer has already been closed and removing a scrollbar causes a resize * event. Don't resize then, it will happen after entering another buffer. diff --git a/src/version.c b/src/version.c index 7b779790d..68b5465ad 100644 --- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1664, +/**/ 1663, /**/ 1662, |