Skip to content

Commit

Permalink
fix: lsp: Don't consume \n\n as a single newline
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Sep 6, 2021
1 parent 3cb95be commit fe17b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-lsp/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fe17b99

Please sign in to comment.