Skip to content

Commit 56f6c5b

Browse files
committed
Revert "Import check.vim from Vim 8.0.0794"
This reverts commit 4289d66. The latest check.vim requires Vim 8.0.0794. It's not convenient.
1 parent 91962de commit 56f6c5b

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/po/check.vim

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ let s:save_wrapscan = &wrapscan
3535
set nowrapscan
3636

3737
" Start at the first "msgid" line.
38-
let wsv = winsaveview()
3938
1
4039
/^msgid\>
4140

@@ -111,41 +110,7 @@ if search('msgid "\("\n"\)\?\([EW][0-9]\+:\).*\nmsgstr "\("\n"\)\?[^"]\@=\2\@!')
111110
endif
112111
endif
113112

114-
func! CountNl(first, last)
115-
let nl = 0
116-
for lnum in range(a:first, a:last)
117-
let nl += count(getline(lnum), "\n")
118-
endfor
119-
return nl
120-
endfunc
121-
122-
" Check that the \n at the end of the msgid line is also present in the msgstr
123-
" line. Skip over the header.
124-
/^"MIME-Version:
125-
while 1
126-
let lnum = search('^msgid\>')
127-
if lnum <= 0
128-
break
129-
endif
130-
let strlnum = search('^msgstr\>')
131-
let end = search('^$')
132-
if end <= 0
133-
let end = line('$') + 1
134-
endif
135-
let origcount = CountNl(lnum, strlnum - 1)
136-
let transcount = CountNl(strlnum, end - 1)
137-
" Allow for a few more or less line breaks when there are 2 or more
138-
if origcount != transcount && (origcount <= 2 || transcount <= 2)
139-
echomsg 'Mismatching "\n" in line ' . line('.')
140-
if error == 0
141-
let error = lnum
142-
endif
143-
endif
144-
endwhile
145-
146113
if error == 0
147-
" If all was OK restore the view.
148-
call winrestview(wsv)
149114
echomsg "OK"
150115
else
151116
exe error

0 commit comments

Comments
 (0)