diff options
author | Dmitry Ulyanov | 2023-04-03 14:22:43 +0000 |
---|---|---|
committer | GitHub | 2023-04-03 14:22:43 +0000 |
commit | dd6e0cce3bcc6a4e57c5869f6a5ba36c101a17b3 (patch) | |
tree | b281da696529cb70fa3e2651dca04b2e8a44ace8 | |
parent | 1fcfef12be3d9041092111523e6c9cb13d2f519c (diff) |
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.
-rw-r--r-- | helix-term/src/commands/lsp.rs | 2 |
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() } |