From 55bbfacdff17689a52709261d40a16c90274195c Mon Sep 17 00:00:00 2001 From: Junfeng Li Date: Thu, 14 Dec 2017 18:38:02 +0000 Subject: [PATCH] Fix deletion off by 1. Close #212. --- src/languageclient.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languageclient.rs b/src/languageclient.rs index 96b31f3a8..d57e7dfb1 100644 --- a/src/languageclient.rs +++ b/src/languageclient.rs @@ -535,7 +535,7 @@ impl ILanguageClient for Arc> { lines.pop(); } self.notify(None, "setline", json!([1, lines]))?; - if lines.len() + 1 < lines_len { + if lines.len() < lines_len { self.command(&format!("{},{}d", lines.len() + 1, lines_len))?; } debug!("End apply WorkspaceEdit");