aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/screen.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-09-02 10:46:24 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-02 12:39:03 +0200
commit66f4e8aee0bb810342364eaf6c9486918cbf1f17 (patch)
tree028e65927ae113a042e2c8a40a9fcc7dfcc73bc3 /src/nvim/screen.c
parent099445cc07b0154edc6ecd562a28e86c87c0096b (diff)
downloadrneovim-66f4e8aee0bb810342364eaf6c9486918cbf1f17.tar.gz
rneovim-66f4e8aee0bb810342364eaf6c9486918cbf1f17.tar.bz2
rneovim-66f4e8aee0bb810342364eaf6c9486918cbf1f17.zip
screen: initialize screen properly with early `set display-=msgsep`
Currently `nvim -u NORC --cmd "set display-=msgsep"` will still allocate the message grid and remove it just afterwards. While inefficient, we must make sure update_screen() re-validates the default_grid completely when this happens. Fix some invalid logic: don't reallocate msg_grid on resize when the grid is not used. Elide a too early ui_flush() on startup, which caused an invalid cursor position to be used.
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r--src/nvim/screen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c
index 8f415a8ed5..b9469686b5 100644
--- a/src/nvim/screen.c
+++ b/src/nvim/screen.c
@@ -404,7 +404,7 @@ int update_screen(int type)
default_grid.valid = true;
}
- if (type == NOT_VALID && msg_dothrottle()) {
+ if (type == NOT_VALID && (msg_dothrottle() || msg_grid.chars)) {
grid_fill(&default_grid, Rows-p_ch, Rows, 0, Columns, ' ', ' ', 0);
}
@@ -7288,9 +7288,9 @@ void screen_resize(int width, int height)
}
}
}
+ ui_flush();
}
- ui_flush();
- --busy;
+ busy--;
}
/// Check if the new Nvim application "shell" dimensions are valid.