From de10d10d3fb1f9660f7f16fa4c596938a2ceb646 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Jun 2026 18:47:57 +0800 Subject: [PATCH] vim-patch:9.1.1865: tests: do not notice lines containing only a tab (#40182) Problem: tests: test_codestyle does not notice lines containing only a tab Solution: Fix the whitespace issue in eval.txt, update test_codestyle to notice such issues (Hirohito Higashi) closes: vim/vim#18595 https://github.com/vim/vim/commit/5b5290ec02ebb16681abc0a617bfd48c75aba353 Co-authored-by: Hirohito Higashi --- test/old/testdir/test_codestyle.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/old/testdir/test_codestyle.vim b/test/old/testdir/test_codestyle.vim index e88b5e3790..6d728972e9 100644 --- a/test/old/testdir/test_codestyle.vim +++ b/test/old/testdir/test_codestyle.vim @@ -93,7 +93,7 @@ func Test_help_files() " Check for unnecessary whitespace at the end of a line call cursor(1, 1) while 1 - let lnum = search('[^/~\\]\s$') + let lnum = search('\%([^/~\\]\|^\)\s\+$') " skip line that are known to have trailing white space if fname == 'map.txt' && getline(lnum) =~ "unmap @@ $" \ || fname == 'usr_12.txt' && getline(lnum) =~ "^\t/ \t$"