fix: use 1 based offsets in get_mru_position

This commit is contained in:
CJ van den Berg 2024-04-09 21:51:17 +02:00
parent 3e97f6627c
commit cbe656fe44

View file

@ -129,7 +129,7 @@ pub fn get_mru_position(self: *Self, from: tp.pid_ref, file_path: []const u8) !v
for (self.files.items) |*file| {
if (!std.mem.eql(u8, file.path, file_path)) continue;
if (file.row != 0)
try from.send(.{ "cmd", "goto", .{ file.row, file.col } });
try from.send(.{ "cmd", "goto", .{ file.row + 1, file.col + 1 } });
return;
}
}