diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index eaaab1c28f..cf77a68d97 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -942,11 +942,25 @@ is_na_patch() { fi ;; *.h) - HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 '-I^#\s*(else|endif)' '-I^#\s*(ifdef|if.*defined\().*FEAT_' "$patch" -- "${file}") + HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ + '-I^\s+$' \ + '-I^#\s*(ifdef|if.*defined\().*FEAT_' \ + '-I^#\s*(else|endif)' \ + '-I^EXTERN char e_.*vim9' \ + '-I^\s*INIT\(= .+"E[0-9]+: .*[vV]im9' \ + "$patch" -- "$file") test -n "${HUNKS}" && return 1 ;; *.c) - HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 '-I^#\s*(else|endif)' '-I^#\s*(ifdef|if.*defined\().*FEAT_' "$patch" -- "$file" | grep -P '^@@ .* @@') + HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ + '-I^\s+$' \ + '-I^#\s*(ifdef|if.*defined\().*FEAT_' \ + '-I^#\s*(else|endif)' \ + '-I#\s*define.*ex_ni$' \ + '-I[_.>]sc_version = ' \ + '-I[_.>]uf_script_ctx_version = ' \ + "$patch" -- "${file}" | + grep '^@@ .* @@') if test -n "$HUNKS"; then HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_C") test "$HUNK_NUM_FINAL" -ne 0 && return 1 diff --git a/scripts/vim_na_hunks_vim.txt b/scripts/vim_na_hunks_vim.txt index a7e4d417db..b7177fd02a 100644 --- a/scripts/vim_na_hunks_vim.txt +++ b/scripts/vim_na_hunks_vim.txt @@ -1,3 +1,4 @@ +^:vim9.\+ .\+\*:vim9.\+\* ^balloon_[a-zA-Z0-9_]\+(.\+balloon_[a-zA-Z0-9_]\+( ^cscope_connection(.\+cscope_connection( ^js_decode(.\+js_decode( @@ -87,6 +88,8 @@ \*:shell\* \*:smile\* \*:version\* +\*E984\* +\*E999\* \*HelpToc-mappings\* \*SafeStateAgain\* \*SigUSR1\*