Skip to content

Commit

Permalink
vim-patch:6f585da00bda
Browse files Browse the repository at this point in the history
Overlong translation files may cause repo to become "dirty"

Problem:  Overlong translation files may cause repo to become "dirty"
Solution: Add a test into check.vim to warn for lines being longer than
          80 virt columns

related: vim/vim#14490

vim/vim@6f585da

Co-authored-by: Christian Brabandt <[email protected]>
  • Loading branch information
zeertzjq and chrisbra committed Apr 11, 2024
1 parent 4459e0c commit f52b43e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nvim/po/check.vim
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,14 @@ elseif ctu
" endif
endif

" Check that all lines are no longer than 80 chars
let overlong = search('\%>80v', 'n')
if overlong > 0
echomsg "Lines should be wrapped at 80 columns"
if error == 0
let error = overlong
endif
endif

if error == 0
" If all was OK restore the view.
Expand Down

0 comments on commit f52b43e

Please sign in to comment.