diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-07 17:45:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-07 17:45:16 +0100 |
commit | 9ff7d717aa3176de5c61de340deb93f41c7780fc (patch) | |
tree | 284675f792fa75b0bca7e6e7a488ce544c9ae450 | |
parent | ac4174e166dd76c72907caa76db0e7cd878ac667 (diff) | |
download | vim-git-9ff7d717aa3176de5c61de340deb93f41c7780fc.tar.gz |
patch 8.2.4910: imperfect codingv8.2.4910
Problem: Imperfect coding.
Solution: Make code nicer.
-rw-r--r-- | src/ex_getln.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 09f284283..7f02b8898 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; diff --git a/src/version.c b/src/version.c index 79e89aa62..4a4c7a9fc 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4910, +/**/ 4909, /**/ 4908, |