fix: lsp: Don't consume \n\n as a single newline

pull/720/head
Blaž Hrastnik 3 years ago
parent 3cb95be452
commit fe17b99ab3

@ -368,7 +368,7 @@ impl Client {
// LSP only considers \n, \r or \r\n as line endings // LSP only considers \n, \r or \r\n as line endings
if ch == '\n' || ch == '\r' { if ch == '\n' || ch == '\r' {
// consume a \r\n // consume a \r\n
if chars.peek() == Some(&'\n') { if ch == '\r' && chars.peek() == Some(&'\n') {
chars.next(); chars.next();
} }
line += 1; line += 1;

Loading…
Cancel
Save