diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 9b3a5fe3b4..2a6780790e 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -969,6 +969,14 @@ is_na_patch() { "$patch" -- "${file}") test -n "$HUNKS" && return 1 ;; + src/testdir/*.vim) + HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ + "$patch" -- "${file}") + if test -n "$HUNKS"; then + HUNK_NUM_FINAL=$(echo "$HUNKS" | grep '^@@ .* @@' | sed 's/^@@ .* @@ //' | grep -cv -e '^func RunVimInTerminal(') + test "$HUNK_NUM_FINAL" -ne 0 && return 1 + fi + ;; *.h) HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ '-I^\s+$' \