From a8fe32040b039c134087c4c0d8c9e14bf50fef1a Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Thu, 8 Jan 2015 10:42:12 -0300 Subject: ui: Dont resize screen if no UIs are attached This prevents a race condition when a UI attaches early in the program and can receive redraw commands for a invalid screen --- src/nvim/ui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nvim/ui.c b/src/nvim/ui.c index b95fdd1104..80f8b9221a 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -167,6 +167,10 @@ void ui_cursor_shape(void) void ui_refresh(void) { + if (!ui_count) { + return; + } + width = height = INT_MAX; for (size_t i = 0; i < ui_count; i++) { -- cgit