From 0860b24c2c9181af4da2499535c013ead7b580a7 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 1 Apr 2026 07:02:10 +0800 Subject: [PATCH] vim-patch:52169db: translation(cleanup): squeeze successive empty lines and remove stray comments closes: vim/vim#19860 https://github.com/vim/vim/commit/52169dbc285724cf2ba5956426fa08d26c6f4672 Co-authored-by: Eisuke Kawashima --- src/nvim/po/cleanup.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nvim/po/cleanup.vim b/src/nvim/po/cleanup.vim index 5e1b96799c..b5b207e1e2 100644 --- a/src/nvim/po/cleanup.vim +++ b/src/nvim/po/cleanup.vim @@ -22,11 +22,14 @@ silent g/^msgstr"/s//msgstr "/ silent g/^msgid"/s//msgid "/ silent g/^msgstr ""\(\n"\)\@!/?^msgid?,.s/^/#\~ / +" remove stray comment +silent g/^\%(#.*\n\)\+\n/d + " Comments only useful for the translator silent g/^#\./d _ " clean up empty lines -silent g/^\n\n\n/.d _ +silent g/^\n\n/.d _ silent! %s/\n\+\%$// if s:was_diff