aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/cmdexpand.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-17 20:09:56 +0800
committerGitHub <noreply@github.com>2023-03-17 20:09:56 +0800
commit07f59467da5a80c7ce46fdc9efcc0e2c18633df1 (patch)
treeddece2b021c97f47a42bb18d59f753d22d6ad77e /src/nvim/cmdexpand.c
parentba8b5649867aa0d349de789828940a48bb42888c (diff)
downloadrneovim-07f59467da5a80c7ce46fdc9efcc0e2c18633df1.tar.gz
rneovim-07f59467da5a80c7ce46fdc9efcc0e2c18633df1.tar.bz2
rneovim-07f59467da5a80c7ce46fdc9efcc0e2c18633df1.zip
refactor(completion): don't add and remove '^' for Lua (#22702)
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r--src/nvim/cmdexpand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index 18d35e1e20..220cb4cf93 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -1206,7 +1206,6 @@ char *addstar(char *fname, size_t len, int context)
// For help tags the translation is done in find_help_tags().
// For a tag pattern starting with "/" no translation is needed.
if (context == EXPAND_HELP
- || context == EXPAND_CHECKHEALTH
|| context == EXPAND_COLORS
|| context == EXPAND_COMPILER
|| context == EXPAND_OWNSYNTAX
@@ -1214,7 +1213,9 @@ char *addstar(char *fname, size_t len, int context)
|| context == EXPAND_PACKADD
|| context == EXPAND_RUNTIME
|| ((context == EXPAND_TAGS_LISTFILES || context == EXPAND_TAGS)
- && fname[0] == '/')) {
+ && fname[0] == '/')
+ || context == EXPAND_CHECKHEALTH
+ || context == EXPAND_LUA) {
retval = xstrnsave(fname, len);
} else {
new_len = len + 2; // +2 for '^' at start, NUL at end