commit 5e6f0e58ed165eececeed5d16fde2c044e879d94
parent 95b6215f0a9deb87fc9a463b9eb942c64924f9cb
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu, 22 Jan 2026 13:35:18 +0800
vim-patch:32a5faa: check.vim complains about overlong comment lines
Problem: check.vim complains about overlong comment lines
Solution: only check the length of non-commented lines
https://github.com/vim/vim/commit/32a5faa6d7592795c6ec77e44dc0357b92b8a681
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nvim/po/check.vim b/src/nvim/po/check.vim
@@ -229,8 +229,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