fix: check for interrupt in nvim_echo, write_msg and nlua_print (#16537)

Fixes `q` in more pager, where `:highlight` can be quit out of with a
single `q` keystroke, while in `:lua print(vim.inspect(vim))` it just
scrolls down a page.
This commit is contained in:
ii14
2021-12-08 17:43:58 +01:00
committed by GitHub
parent 5b117bbc75
commit db4bc32c4a
2 changed files with 7 additions and 1 deletions

View File

@@ -521,6 +521,9 @@ static void nlua_print_event(void **argv)
const size_t len = (size_t)(intptr_t)argv[1]-1; // exclude final NUL
for (size_t i = 0; i < len;) {
if (got_int) {
break;
}
const size_t start = i;
while (i < len) {
switch (str[i]) {