Mercurial > vim
diff src/cmdexpand.c @ 31819:aec031683d61 v9.0.1242
patch 9.0.1242: code for :runtime completion is not consistent
Commit: https://github.com/vim/vim/commit/b0d45ec67f4976318f199a7929ad3bcf93686fd0
Author: zeertzjq <zeertzjq@outlook.com>
Date: Wed Jan 25 15:04:22 2023 +0000
patch 9.0.1242: code for :runtime completion is not consistent
Problem: Code for :runtime completion is not consistent.
Solution: Make code for cmdline expansion more consistent. (closes https://github.com/vim/vim/issues/11875)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Jan 2023 16:15:06 +0100 |
parents | c5ff7d053fa1 |
children | bea4ebf594c6 |
line wrap: on
line diff
--- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -1363,11 +1363,11 @@ addstar( // For a tag pattern starting with "/" no translation is needed. if (context == EXPAND_HELP || context == EXPAND_COLORS - || context == EXPAND_RUNTIME || context == EXPAND_COMPILER || context == EXPAND_OWNSYNTAX || context == EXPAND_FILETYPE || context == EXPAND_PACKADD + || context == EXPAND_RUNTIME || ((context == EXPAND_TAGS_LISTFILES || context == EXPAND_TAGS) && fname[0] == '/')) @@ -2314,10 +2314,6 @@ set_context_by_cmdname( xp->xp_pattern = arg; break; - case CMD_runtime: - set_context_in_runtime_cmd(xp, arg); - break; - case CMD_compiler: xp->xp_context = EXPAND_COMPILER; xp->xp_pattern = arg; @@ -2338,6 +2334,10 @@ set_context_by_cmdname( xp->xp_pattern = arg; break; + case CMD_runtime: + set_context_in_runtime_cmd(xp, arg); + break; + #if defined(HAVE_LOCALE_H) || defined(X_LOCALE) case CMD_language: return set_context_in_lang_cmd(xp, arg);