msg_puts_attr_len: check default_grid.chars if headless

Nvim might call `msg_puts_attr_len` before the screen buffers are allocated.
This commit is contained in:
Björn Linse 2019-06-03 21:31:01 +02:00 committed by Justin M. Keyes
parent 27b684b83f
commit c06504687d

View File

@ -1812,7 +1812,7 @@ void msg_puts_attr_len(const char *const str, const ptrdiff_t len, int attr)
msg_col = saved_msg_col; msg_col = saved_msg_col;
} }
} }
if (!msg_use_printf() || headless_mode) { if (!msg_use_printf() || (headless_mode && default_grid.chars)) {
msg_puts_display((const char_u *)str, len, attr, false); msg_puts_display((const char_u *)str, len, attr, false);
} }
} }