mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
parent
8ce22c6323
commit
297973ab00
@ -208,10 +208,11 @@ static void try_resize(Event ev)
|
|||||||
static void sigwinch_cb(uv_signal_t *handle, int signum)
|
static void sigwinch_cb(uv_signal_t *handle, int signum)
|
||||||
{
|
{
|
||||||
// Queue the event because resizing can result in recursive event_poll calls
|
// 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) {
|
event_push((Event) {
|
||||||
.data = handle->data,
|
.data = handle->data,
|
||||||
.handler = try_resize
|
.handler = try_resize
|
||||||
}, false);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool attrs_differ(HlAttrs a1, HlAttrs a2)
|
static bool attrs_differ(HlAttrs a1, HlAttrs a2)
|
||||||
|
Loading…
Reference in New Issue
Block a user