fix: mru position should not override line numbers on command line

This commit is contained in:
CJ van den Berg 2025-03-04 18:51:27 +01:00
parent e285099253
commit ba470610be
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -359,7 +359,7 @@ const cmds = struct {
const same_file = if (self.get_active_file_path()) |fp| std.mem.eql(u8, fp, f) else false;
const have_editor_metadata = if (self.buffer_manager.get_buffer_for_file(f)) |_| true else false;
if (!same_file and !have_editor_metadata)
if (!same_file and !have_editor_metadata and line == null)
if (try project_manager.get_mru_position(self.allocator, f)) |pos| {
line = @intCast(pos.row);
column = @intCast(pos.col);