]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0109: VIM_BACKTICK is always defined except for tiny builds v9.2.0109
authorMartin Tournoij <martin@arp242.net>
Wed, 4 Mar 2026 19:54:15 +0000 (19:54 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 4 Mar 2026 19:58:49 +0000 (19:58 +0000)
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 <martin@arp242.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/feature.h
src/filepath.c
src/misc1.c
src/os_amiga.c
src/os_mswin.c
src/version.c

index 24928edf61ff7fea3a3177245b564fee7cbafcd4..2918fe18d9ff23f2530a26013bb91b8a27ea9fc5 100644 (file)
 # define FEAT_KEYMAP
 #endif
 
-#ifdef FEAT_NORMAL
-# define VIM_BACKTICK          // internal backtick expansion
-#endif
-
 /*
  * +linebreak          'showbreak', 'breakat' and 'linebreak' options.
  *                     Also 'numberwidth'.
index f3396d143c31a7a5acf34de7a18b27dcbc5f8fcf..91423d9dccd1c2f8d04d428fcaa220405d997e00 100644 (file)
@@ -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/".
index 917e9d3067e4ba3efb7bec7bde774f74a27cfd13..bc1d5b6b30f0f17fb0e446a2cb86d67fb0f9bf7f 100644 (file)
@@ -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
index 546ebabc761cba4330d9161b2d2f1b890b506f4b..db433e4442977142145482dc752ae92e6b396d75 100644 (file)
@@ -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;
     }
index 7118bc413aa3c4b0d857c5b2ec4069d1e149c72c..f8fee0e591e4f2380adb058a0933f8e832f64703 100644 (file)
@@ -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;
     }
index 49a8fb31388d3317dff4608333641f38f6257cc7..39821b7522a05d3efc8ee221e9737ac354734e1b 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    109,
 /**/
     108,
 /**/