msg_outtrans_special(): handle NULL

This is convenient for terminfo_info_msg().
This commit is contained in:
Justin M. Keyes
2017-12-02 18:55:54 +01:00
parent 5de1eae4f2
commit 1cae99b4bf

View File

@@ -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.