Merge #10109 from erw7/fix-screenchar-on-headless-mode

ref #9338
This commit is contained in:
Justin M. Keyes 2019-06-03 22:45:00 +02:00 committed by GitHub
commit dc4fa0b24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 && default_grid.chars)) {
msg_puts_display((const char_u *)str, len, attr, false);
}
}