mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 13:28:19 +00:00
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:
@@ -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]) {
|
||||
|
Reference in New Issue
Block a user