]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
check.vim complains about overlong comment lines
authorChristian Brabandt <cb@256bit.org>
Thu, 30 May 2024 07:51:47 +0000 (09:51 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 30 May 2024 07:51:47 +0000 (09:51 +0200)
Problem:  check.vim complains about overlong comment lines
Solution: only check the length of non-commented lines

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/po/check.vim

index b0460f10de0566be78e8c55258bf1b1b52315abc..2ea4a3824e12cc0e6e8ade4f6fc3ee9bef0d961a 100644 (file)
@@ -226,8 +226,8 @@ elseif ctu
   " endif
 endif
 
-" Check that all lines are no longer than 80 chars
-let overlong = search('\%>80v', 'n')
+" Check that no lines are longer than 80 chars (except comments)
+let overlong = search('^[^#]\%>80v', 'n')
 if overlong > 0
   echomsg "Lines should be wrapped at 80 columns"
   " TODO: make this an error