From 3817518ab43cd7986fd670dbb955d89d7dc5685a Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 22 Sep 2019 21:51:55 +0200 Subject: [release-0.4] terminfo_start: flush buffer #11074 This aligns with `terminfo_stop`, which also flushes the buffer after disabling things. This ensures Neovim gets the response to the terminal background query before exiting (`nvim -u NONE -cq` with e.g. urxvt or kitty). Caveats: * With kitty this causes some "flickering", likely since the alternate screen is being setup with `nvim -u NONE -cq`, whereas it would not be processed otherwise before quitting (as with the background query). * tmux after this patch may print ^[[I (CSI I / FocusGained) after `nvim -u NONE -cq`. Fixes https://github.com/neovim/neovim/issues/11062 Ref: https://github.com/neovim/neovim/issues/11181 --- src/nvim/tui/tui.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index c0845f9524..b16ca4c0e2 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -312,6 +312,7 @@ static void terminfo_start(UI *ui) uv_pipe_init(&data->write_loop, &data->output_handle.pipe, 0); uv_pipe_open(&data->output_handle.pipe, data->out_fd); } + flush_buf(ui); } static void terminfo_stop(UI *ui) -- cgit