fix: store jump location source before navigating to another file
This commit is contained in:
parent
390a56714a
commit
48fc8a968c
2 changed files with 2 additions and 1 deletions
|
@ -1047,7 +1047,7 @@ pub const Editor = struct {
|
|||
try self.send_editor_cursel_msg("modified", self.get_primary());
|
||||
}
|
||||
|
||||
fn send_editor_jump_source(self: *Self) !void {
|
||||
pub fn send_editor_jump_source(self: *Self) !void {
|
||||
try self.send_editor_cursel_msg("jump_source", self.get_primary());
|
||||
}
|
||||
|
||||
|
|
|
@ -199,6 +199,7 @@ const cmds = struct {
|
|||
else
|
||||
false else false;
|
||||
if (!same_file) {
|
||||
if (self.editor) |editor| editor.send_editor_jump_source() catch {};
|
||||
try self.create_editor();
|
||||
try command.executeName("open_file", command.fmt(.{f}));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue