aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-03 21:31:01 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-06-03 22:41:48 +0200
commitc06504687dd47b10d1acd51d6360a513e36e3de5 (patch)
tree771c7807040e7ff6f22eaa65b82c3d7cda24c53e /src
parent27b684b83f393fb65e27840ca7cdfe09ad341e8e (diff)
downloadrneovim-c06504687dd47b10d1acd51d6360a513e36e3de5.tar.gz
rneovim-c06504687dd47b10d1acd51d6360a513e36e3de5.tar.bz2
rneovim-c06504687dd47b10d1acd51d6360a513e36e3de5.zip
msg_puts_attr_len: check default_grid.chars if headless
Nvim might call `msg_puts_attr_len` before the screen buffers are allocated.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 5f3d367504..5188824901 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1812,7 +1812,7 @@ void msg_puts_attr_len(const char *const str, const ptrdiff_t len, int attr)
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);
}
}