mirror of https://github.com/helix-editor/helix
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.pull/6568/head
parent
1fcfef12be
commit
dd6e0cce3b
|
@ -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
|
// Most commonly, this will not allocate, especially on Unix systems where the root prefix
|
||||||
// is a simple `/` and not `C:\` (with whatever drive letter)
|
// 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");
|
.expect("Will only failed if allocating fail");
|
||||||
res.into()
|
res.into()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue