mirror of
https://github.com/neovim/neovim.git
synced 2026-08-24 08:01:53 +00:00
vim-patch:9.2.0683: filetype completion mishandles finished sub options (#40351)
Problem: ":filetype plugin<Tab>" gives "pluginindent" because a
sub option before the cursor is treated as already given.
Solution: only skip plugin and indent when followed by white space.
(glepnir)
closes: vim/vim#20594
fe65f23aca
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -1957,12 +1957,12 @@ static const char *set_context_in_filetype_cmd(expand_T *xp, const char *arg)
|
||||
int val = 0;
|
||||
|
||||
while (true) {
|
||||
if (strncmp(p, "plugin", 6) == 0) {
|
||||
if (strncmp(p, "plugin", 6) == 0 && ascii_iswhite(p[6])) {
|
||||
val |= EXPAND_FILETYPECMD_PLUGIN;
|
||||
p = skipwhite(p + 6);
|
||||
continue;
|
||||
}
|
||||
if (strncmp(p, "indent", 6) == 0) {
|
||||
if (strncmp(p, "indent", 6) == 0 && ascii_iswhite(p[6])) {
|
||||
val |= EXPAND_FILETYPECMD_INDENT;
|
||||
p = skipwhite(p + 6);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user