From fe17b99ab399d1ee5483ad54c6b124af869afdb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Mon, 6 Sep 2021 15:25:08 +0900 Subject: [PATCH] fix: lsp: Don't consume \n\n as a single newline --- helix-lsp/src/client.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 52b2c1c9..d0a8183f 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -368,7 +368,7 @@ impl Client { // LSP only considers \n, \r or \r\n as line endings if ch == '\n' || ch == '\r' { // consume a \r\n - if chars.peek() == Some(&'\n') { + if ch == '\r' && chars.peek() == Some(&'\n') { chars.next(); } line += 1;