mirror of
https://github.com/neovim/neovim.git
synced 2026-08-27 17:41:48 +00:00
fix(api, lua): make blank lines in a message work properly
(cherry picked from commit e6bb22e691)
This commit is contained in:
committed by
github-actions[bot]
parent
041bc87333
commit
617c6014ea
@@ -1686,6 +1686,7 @@ static void write_msg(String message, bool to_err, bool writeln)
|
||||
if (c == NL) { \
|
||||
kv_push(line_buf, NUL); \
|
||||
msg(line_buf.items); \
|
||||
msg_didout = true; \
|
||||
kv_drop(line_buf, kv_size(line_buf)); \
|
||||
kv_resize(line_buf, LINE_BUFFER_MIN_SIZE); \
|
||||
} else { \
|
||||
|
||||
@@ -944,6 +944,7 @@ static void nlua_print_event(void **argv)
|
||||
break;
|
||||
}
|
||||
msg(str + start);
|
||||
msg_didout = true; // Make blank lines work properly
|
||||
}
|
||||
if (len && str[len - 1] == NUL) { // Last was newline
|
||||
msg("");
|
||||
|
||||
Reference in New Issue
Block a user