Skip to content

Commit

Permalink
Fix line number display for LSP goto pickers (#6559)
Browse files Browse the repository at this point in the history
Line numbers are 0-indexed in the LSP spec but 1-indexed for display
and jumping purposes in Helix.
  • Loading branch information
sillent authored Apr 3, 2023
1 parent 1fcfef1 commit dd6e0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/commands/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit dd6e0cc

Please sign in to comment.