fix: row & column in get_mru_position

This commit is contained in:
CJ van den Berg 2025-02-22 22:20:11 +01:00
parent 2a76da6cf6
commit 30de4ddcc6
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -418,7 +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 { pub fn get_mru_position(self: *Self, from: tp.pid_ref, file_path: []const u8) ClientError!void {
for (self.files.items) |*file| { for (self.files.items) |*file| {
if (!std.mem.eql(u8, file.path, file_path)) continue; if (!std.mem.eql(u8, file.path, file_path)) continue;
from.send(.{ file.pos.row, file.pos.col }) catch return error.ClientFailed; from.send(.{ file.pos.row + 1, file.pos.col + 1 }) catch return error.ClientFailed;
return; return;
} }
} }