diff options
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 09f2842833..7f02b88984 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4130,7 +4130,7 @@ get_cmdline_completion(void) return NULL; p = get_ccline_ptr(); - if (p && p->xpc != NULL) + if (p != NULL && p->xpc != NULL) { char_u *cmd_compl; @@ -4138,7 +4138,7 @@ get_cmdline_completion(void) cmd_compl = cmdcomplete_type_to_str(p->xpc->xp_context); if (cmd_compl != NULL) - return vim_strnsave(cmd_compl, strlen((char *)cmd_compl)); + return vim_strsave(cmd_compl); } return NULL; |