diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/indent.c | 4 | ||||
-rw-r--r-- | src/nvim/os_unix.c | 8 | ||||
-rw-r--r-- | src/nvim/path.c | 2 | ||||
-rw-r--r-- | src/nvim/path.h | 1 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 7090e007bf..075acc6c13 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -58,8 +58,8 @@ int get_indent_str(char_u *ptr, int ts, int list) if (!list || lcs_tab1) { // count a tab for what it is worth count += ts - (count % ts); } else { - // in list mode, when tab is not set, count screen char width for Tab: - // ^I + // In list mode, when tab is not set, count screen char width + // for Tab, displays: ^I count += ptr2cells(ptr); } } else if (*ptr == ' ') { diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index a9c1fec0b4..612f475933 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -1066,10 +1066,12 @@ int mch_expand_wildcards(int num_pat, char_u **pat, int *num_file, || pat[i][j + 1] == '`') *p++ = '\\'; ++j; - } else if (!intick && vim_strchr(SHELL_SPECIAL, - pat[i][j]) != NULL) + } else if (!intick + && ((flags & EW_KEEPDOLLAR) == 0 || pat[i][j] != '$') + && vim_strchr(SHELL_SPECIAL, pat[i][j]) != NULL) /* Put a backslash before a special character, but not - * when inside ``. */ + * when inside ``. And not for $var when EW_KEEPDOLLAR is + * set. */ *p++ = '\\'; /* Copy one character. */ diff --git a/src/nvim/path.c b/src/nvim/path.c index e8d31f3f73..950cc5a83a 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1080,7 +1080,7 @@ gen_expand_wildcards ( free(p); ga_clear_strings(&ga); i = mch_expand_wildcards(num_pat, pat, num_file, file, - flags); + flags | EW_KEEPDOLLAR); recursive = FALSE; return i; } diff --git a/src/nvim/path.h b/src/nvim/path.h index 9a994f3477..628ea335ed 100644 --- a/src/nvim/path.h +++ b/src/nvim/path.h @@ -17,6 +17,7 @@ #define EW_ICASE 0x100 /* ignore case */ #define EW_NOERROR 0x200 /* no error for bad regexp */ #define EW_NOTWILD 0x400 /* add match with literal name if exists */ +#define EW_KEEPDOLLAR 0x800 /* do not escape $, $var is expanded */ /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND * is used when executing commands and EW_SILENT for interactive expanding. */ diff --git a/src/nvim/version.c b/src/nvim/version.c index 3460b7c6c3..de4f6ffd87 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -306,7 +306,7 @@ static int included_patches[] = { //426 NA 425, //424 NA - //423, + 423, //422, 421, //420 NA |