From 04f802a2f6387028e3389334e6e04abc28d92587 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 9 Aug 2026 06:49:05 -0400 Subject: [PATCH] build(vim-patch): n/a patches from comments, ifdefs #41247 vim-patch.sh fails to detect n/a patches because of ifdef FEAT_ guards and reserved Vim9script error codes. Ignore all conditional directives for Vim's "FEAT_" guards. https://cppreference.com/c/preprocessor/conditional --- scripts/vim-patch.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 1ec4101b3b..7de6ea129e 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -957,7 +957,9 @@ is_na_patch() { *.h) HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ '-I^\s+$' \ - '-I^#\s*(ifdef|if.*defined\().*FEAT_' \ + '-I^\s*/?\*/?$' \ + '-I^\s*(//|/?\*).*\s[vV]im9' \ + '-I^#\s*((ifdef|ifndef|define|undef)|(if|elif)\s.*defined\().*FEAT_' \ '-I^#\s*(else|endif)' \ '-I#\s*define\s+XDG_' \ '-I^EXTERN type_T t_.* INIT[2-9]\(' \ @@ -984,9 +986,11 @@ is_na_patch() { *.c) HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ '-I^\s+$' \ - '-I^#\s*include\s+]sc_version = ' \