From 297973ab00155048a627e8bf72ff4b14d71a6a01 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 25 May 2015 13:47:01 +0200 Subject: [PATCH] tui: defer resize event #2738 When maximizing the window, often only lines would be detected properly with the `try_resize` handler being called immediately. Fixes https://github.com/neovim/neovim/issues/2322. --- src/nvim/tui/tui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index 763a7c0e6d..1a8e4523b7 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -208,10 +208,11 @@ static void try_resize(Event ev) static void sigwinch_cb(uv_signal_t *handle, int signum) { // Queue the event because resizing can result in recursive event_poll calls + // FIXME(blueyed): TUI does not resize properly when not deferred. Why? #2322 event_push((Event) { .data = handle->data, .handler = try_resize - }, false); + }, true); } static bool attrs_differ(HlAttrs a1, HlAttrs a2)