fix: hover should convert column to byte position in LSP request
closes: #85
This commit is contained in:
parent
030b3cb139
commit
1aa64b8ea4
1 changed files with 3 additions and 1 deletions
|
@ -3975,7 +3975,9 @@ pub const Editor = struct {
|
|||
|
||||
pub fn hover_at(self: *Self, row: usize, col: usize) Result {
|
||||
const file_path = self.file_path orelse return;
|
||||
return project_manager.hover(file_path, row, col);
|
||||
const root = self.buf_root() catch return;
|
||||
const pos = root.get_line_width_to_pos(row, col, self.metrics) catch return;
|
||||
return project_manager.hover(file_path, row, pos);
|
||||
}
|
||||
|
||||
pub fn add_diagnostic(
|
||||
|
|
Loading…
Add table
Reference in a new issue