patch 9.2.0109: VIM_BACKTICK is always defined except for tiny builds
Commit:
https://github.com/vim/vim/commit/6c34ace536310ed2741091bcb13e3b6cf6dda893
Author: Martin Tournoij <
mar...@arp242.net>
Date: Wed Mar 4 19:54:15 2026 +0000
patch 9.2.0109: VIM_BACKTICK is always defined except for tiny builds
Problem: VIM_BACKTICK is always defined except for tiny builds
Solution: Remove the VIM_BACKTICK define and always compile backtick
expansion. This change however will cause the vim.tiny build
to be slightly larger (Martin Tournoij).
closes: #19562
Signed-off-by: Martin Tournoij <
mar...@arp242.net>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/feature.h b/src/feature.h
index 24928edf6..2918fe18d 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -170,10 +170,6 @@
# define FEAT_KEYMAP
#endif
-#ifdef FEAT_NORMAL
-# define VIM_BACKTICK // internal backtick expansion
-#endif
-
/*
* +linebreak 'showbreak', 'breakat' and 'linebreak' options.
* Also 'numberwidth'.
diff --git a/src/filepath.c b/src/filepath.c
index f3396d143..91423d9dc 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -3429,8 +3429,6 @@ match_suffix(char_u *fname)
return (setsuflen != 0);
}
-#ifdef VIM_BACKTICK
-
/*
* Return TRUE if we can expand this backtick thing here.
*/
@@ -3462,11 +3460,11 @@ expand_backtick(
if (cmd == NULL)
return -1;
-# ifdef FEAT_EVAL
+#ifdef FEAT_EVAL
if (*cmd == '=') // `={expr}`: Expand expression
buffer = eval_to_string(cmd + 1, TRUE, FALSE);
else
-# endif
+#endif
buffer = get_cmd_output(cmd, NULL,
(flags & EW_SILENT) ? SHELL_SILENT : 0, NULL);
vim_free(cmd);
@@ -3497,7 +3495,6 @@ expand_backtick(
vim_free(buffer);
return cnt;
}
-#endif // VIM_BACKTICK
#if defined(MSWIN)
/*
@@ -4105,9 +4102,7 @@ gen_expand_wildcards(
for (i = 0; i < num_pat; i++)
{
if (has_special_wildchar(pat[i])
-# ifdef VIM_BACKTICK
&& !(vim_backtick(pat[i]) && pat[i][1] == '=')
-# endif
)
return mch_expand_wildcards(num_pat, pat, num_file, file, flags);
}
@@ -4125,7 +4120,6 @@ gen_expand_wildcards(
add_pat = -1;
p = pat[i];
-#ifdef VIM_BACKTICK
if (vim_backtick(p))
{
add_pat = expand_backtick(&ga, p, flags);
@@ -4133,7 +4127,6 @@ gen_expand_wildcards(
retval = FAIL;
}
else
-#endif
{
/*
* First expand environment variables, "~/" and "~user/".
diff --git a/src/misc1.c b/src/misc1.c
index 917e9d306..bc1d5b6b3 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2388,8 +2388,7 @@ veryfast_breakcheck(void)
}
#endif
-#if defined(VIM_BACKTICK) || defined(FEAT_EVAL) \
- || (defined(HAVE_LOCALE_H) || defined(X_LOCALE))
+#if defined(FEAT_EVAL) || (defined(HAVE_LOCALE_H) || defined(X_LOCALE))
# ifndef SEEK_SET
# define SEEK_SET 0
diff --git a/src/os_amiga.c b/src/os_amiga.c
index 546ebabc7..db433e444 100644
--- a/src/os_amiga.c
+++ b/src/os_amiga.c
@@ -1683,13 +1683,7 @@ mch_has_wildcard(char_u *p)
if (*p == '\' && p[1] != NUL)
++p;
else
- if (vim_strchr((char_u *)
-#ifdef VIM_BACKTICK
- "*?[(#$`"
-#else
- "*?[(#$"
-#endif
- , *p) != NULL
+ if (vim_strchr((char_u *)"*?[(#$`", *p) != NULL
|| (*p == '~' && p[1] != NUL))
return TRUE;
}
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 7118bc413..f8fee0e59 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -635,13 +635,7 @@ mch_has_wildcard(char_u *p)
{
for ( ; *p; MB_PTR_ADV(p))
{
- if (vim_strchr((char_u *)
-#ifdef VIM_BACKTICK
- "?*$[`"
-#else
- "?*$["
-#endif
- , *p) != NULL
+ if (vim_strchr((char_u *)"?*$[`", *p) != NULL
|| (*p == '~' && p[1] != NUL))
return TRUE;
}
diff --git a/src/version.c b/src/version.c
index 49a8fb313..39821b752 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 109,
/**/
108,
/**/