aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-09-06 06:25:08 +0000
committerBlaž Hrastnik2021-09-06 06:25:08 +0000
commitfe17b99ab399d1ee5483ad54c6b124af869afdb6 (patch)
tree4e8f030de09e0f74fac5c8191dd08bf36ec032b7
parent3cb95be452491a72d18c98ebc619b0d2abb1b746 (diff)
fix: lsp: Don't consume \n\n as a single newline
-rw-r--r--helix-lsp/src/client.rs2
1 files changed, 1 insertions, 1 deletions
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;