on master help sign in
Fix line number display for LSP goto pickers (#6559)

Line numbers are 0-indexed in the LSP spec but 1-indexed for display and jumping purposes in Helix.

commitdd6e0cce3bcc6a4e57c5869f6a5ba36c101a17b3 authorDmitry Ulyanov <sillent1987@gmail.com> dateMon 3 Apr 2023, 17:22 (4 years ago) parent1fcfef1
1 file changed+1−1
helix-term/src/commands/lsp.rs+1−1
helix-term/src/commands/lsp.rs+1−1
@@ -81,7 +81,7 @@ impl ui::menu::Item for lsp::Location {
8181
8282 // Most commonly, this will not allocate, especially on Unix systems where the root prefix
8383 // is a simple `/` and not `C:\` (with whatever drive letter)
84− write!(&mut res, ":{}", self.range.start.line)
84+ write!(&mut res, ":{}", self.range.start.line + 1)
8585 .expect("Will only failed if allocating fail");
8686 res.into()
8787 }