aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-17 23:27:04 +0800
committerGitHub <noreply@github.com>2023-04-17 23:27:04 +0800
commit9e5f9c25d9955f8c0ab7de874cf3a40fc077458b (patch)
tree337e0b74b61c2970fb3210b8a555c373276d5696 /src
parent07b60efd8058bb515998f50048b511d50f9671f8 (diff)
downloadrneovim-9e5f9c25d9955f8c0ab7de874cf3a40fc077458b.tar.gz
rneovim-9e5f9c25d9955f8c0ab7de874cf3a40fc077458b.tar.bz2
rneovim-9e5f9c25d9955f8c0ab7de874cf3a40fc077458b.zip
vim-patch:9.0.1460: insufficient testing for getcmdcompltype() (#23159)
Problem: Insufficient testing for getcmdcompltype(). Solution: Add a few more test cases. (closes vim/vim#12268) https://github.com/vim/vim/commit/961b2e54bdbe1c06e4bf8ccf7a7e3deb129b45de
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_getln.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index f3afbdcaaf..97343e468b 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -4096,6 +4096,10 @@ static char *get_cmdline_completion(void)
}
set_expand_context(p->xpc);
+ if (p->xpc->xp_context == EXPAND_UNSUCCESSFUL) {
+ return NULL;
+ }
+
char *cmd_compl = get_user_cmd_complete(p->xpc, p->xpc->xp_context);
if (cmd_compl != NULL) {
return xstrdup(cmd_compl);