From 5e6f0e58ed165eececeed5d16fde2c044e879d94 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 22 Jan 2026 13:35:18 +0800 Subject: [PATCH] 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 --- src/nvim/po/check.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/po/check.vim b/src/nvim/po/check.vim index 5139d35f67..9ee45fb78d 100644 --- 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