fix: lsp: Don't consume \n\n as a single newline
commitfe17b99ab399d1ee5483ad54c6b124af869afdb6
authorBlaž Hrastnik <blaz@mxxn.io>
dateMon 6 Sep 2021, 15:25 (5 years ago)
parent3cb95be
helix-lsp/src/client.rs+1−1
@@ -368,7 +368,7 @@ impl Client {
368368 // LSP only considers \n, \r or \r\n as line endings
369369 if ch == '\n' || ch == '\r' {
370370 // consume a \r\n
371− if chars.peek() == Some(&'\n') {
371+ if ch == '\r' && chars.peek() == Some(&'\n') {
372372 chars.next();
373373 }
374374 line += 1;