aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-09-22 21:51:55 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-09-22 12:51:55 -0700
commit3626d2107eae23433b88612b01bba7015951d37d (patch)
tree13fbb6e1945c83ca3ccff310a6ce229afa48ca4e
parentfb26c38434f82af2a601a91c99adb40ecefa0d89 (diff)
downloadrneovim-3626d2107eae23433b88612b01bba7015951d37d.tar.gz
rneovim-3626d2107eae23433b88612b01bba7015951d37d.tar.bz2
rneovim-3626d2107eae23433b88612b01bba7015951d37d.zip
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
-rw-r--r--src/nvim/tui/tui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 791756e5c5..0b3bed1c76 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)