feat: make mru file position lookup synchronous
This commit is contained in:
parent
5f7b28db5f
commit
2a76da6cf6
3 changed files with 16 additions and 7 deletions
|
@ -418,8 +418,7 @@ fn update_mru_internal(self: *Self, file_path: []const u8, mtime: i128, row: usi
|
|||
pub fn get_mru_position(self: *Self, from: tp.pid_ref, file_path: []const u8) ClientError!void {
|
||||
for (self.files.items) |*file| {
|
||||
if (!std.mem.eql(u8, file.path, file_path)) continue;
|
||||
if (file.row != 0)
|
||||
from.send(.{ "cmd", "goto_line_and_column", .{ file.row + 1, file.col + 1 } }) catch return error.ClientFailed;
|
||||
from.send(.{ file.pos.row, file.pos.col }) catch return error.ClientFailed;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue