Unnamed repository; edit this file 'description' to name the repository.
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.
Dmitry Ulyanov 2023-04-03
parent 1fcfef1 · commit dd6e0cc
-rw-r--r--helix-term/src/commands/lsp.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index f8e83a46..78dbc0be 100644
--- a/helix-term/src/commands/lsp.rs
+++ b/helix-term/src/commands/lsp.rs
@@ -81,7 +81,7 @@ impl ui::menu::Item for lsp::Location {
// Most commonly, this will not allocate, especially on Unix systems where the root prefix
// is a simple `/` and not `C:\` (with whatever drive letter)
- write!(&mut res, ":{}", self.range.start.line)
+ write!(&mut res, ":{}", self.range.start.line + 1)
.expect("Will only failed if allocating fail");
res.into()
}