diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-02 18:55:54 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-12-05 01:46:40 +0100 |
commit | 1cae99b4bf6517d559ff222b968c314198923260 (patch) | |
tree | d1f4429ba02c18235aeaf18798daefc033711ac3 | |
parent | 5de1eae4f2353de1dc4cdeb3e5bad0a908faf9c8 (diff) | |
download | rneovim-1cae99b4bf6517d559ff222b968c314198923260.tar.gz rneovim-1cae99b4bf6517d559ff222b968c314198923260.tar.bz2 rneovim-1cae99b4bf6517d559ff222b968c314198923260.zip |
msg_outtrans_special(): handle NULL
This is convenient for terminfo_info_msg().
-rw-r--r-- | src/nvim/message.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 907a2472c8..5c8f0655bf 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1254,11 +1254,13 @@ int msg_outtrans_special( int from ///< true for LHS of a mapping ) { + if (strstart == NULL) { + return 0; // Do nothing. + } const char_u *str = strstart; int retval = 0; - int attr; + int attr = hl_attr(HLF_8); - attr = hl_attr(HLF_8); while (*str != NUL) { const char *string; // Leading and trailing spaces need to be displayed in <> form. |