diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-07-20 18:28:16 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-12-25 19:25:30 -0500 |
commit | 0519a75f6eca1065a4d0184f99c71ae03a99b9b1 (patch) | |
tree | 16f28a8a5e9768079cabd97c379d14962232b6d7 /src/nvim/getchar.c | |
parent | 84faeb07d0018c674c2bc730333fefae6123f366 (diff) | |
download | rneovim-0519a75f6eca1065a4d0184f99c71ae03a99b9b1.tar.gz rneovim-0519a75f6eca1065a4d0184f99c71ae03a99b9b1.tar.bz2 rneovim-0519a75f6eca1065a4d0184f99c71ae03a99b9b1.zip |
vim-patch:8.1.0822: peeking and flushing output slows down execution
Problem: Peeking and flushing output slows down execution.
Solution: Do not update the mode message when global_busy is set. Do not
flush when only peeking for a character. (Ken Takata)
https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 2e2993ed26..eddbdef739 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2490,8 +2490,10 @@ int inchar( } // Always flush the output characters when getting input characters - // from the user. - ui_flush(); + // from the user and not just peeking. + if (wait_time == -1L || wait_time > 10L) { + ui_flush(); + } // Fill up to a third of the buffer, because each character may be // tripled below. |