Fix screenchar() problem in headless mode

In the case of the headless mode, screenchar() does not operate normally
because it is not output to the internal screen. Change output to stderr
and internal screen to fix it.
This commit is contained in:
erw7 2019-05-29 16:23:55 +09:00 committed by Justin M. Keyes
parent 4841c46e33
commit 27b684b83f

View File

@ -1806,8 +1806,13 @@ void msg_puts_attr_len(const char *const str, const ptrdiff_t len, int attr)
// different, e.g. for Win32 console) or we just don't know where the
// cursor is.
if (msg_use_printf()) {
int saved_msg_col = msg_col;
msg_puts_printf(str, len);
} else {
if (headless_mode) {
msg_col = saved_msg_col;
}
}
if (!msg_use_printf() || headless_mode) {
msg_puts_display((const char_u *)str, len, attr, false);
}
}