Skip to content

Commit 7cf0665

Browse files
authored
Merge pull request #784 from nickspoons/send-trailing-eol-to-server
Send trailing line to server when 'eol' is set
2 parents d322a70 + 2eaba99 commit 7cf0665

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

autoload/OmniSharp/stdio.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@ function! OmniSharp#stdio#Request(command, opts) abort
191191
let lines[a:opts.OverrideBuffer.LineNr - 1] = a:opts.OverrideBuffer.Line
192192
let cnum = a:opts.OverrideBuffer.Col
193193
endif
194+
if &endofline
195+
" Ensure that the final trailing <EOL> is included, so that EOL analyzers
196+
" won't complain about missing <EOL> on the final line when it does
197+
" actually exist, it just isn't displayed by vim.
198+
call add(lines, '')
199+
endif
194200
let tmp = join(lines, '')
195201
" Unique string separator which must not exist in the buffer
196202
let sep = '@' . matchstr(reltimestr(reltime()), '\v\.@<=\d+') . '@'

0 commit comments

Comments
 (0)