refactor: update Buffer.last_view when navigating
This commit is contained in:
parent
94e6965ad0
commit
1263d3c9e8
1 changed files with 2 additions and 0 deletions
|
|
@ -1534,6 +1534,8 @@ pub fn location_update_from_editor(self: *Self) void {
|
||||||
const editor = self.get_active_editor() orelse return;
|
const editor = self.get_active_editor() orelse return;
|
||||||
const file_path = editor.file_path orelse return;
|
const file_path = editor.file_path orelse return;
|
||||||
const ephemeral = if (editor.buffer) |buffer| buffer.is_ephemeral() else false;
|
const ephemeral = if (editor.buffer) |buffer| buffer.is_ephemeral() else false;
|
||||||
|
if (editor.buffer) |buffer|
|
||||||
|
buffer.set_last_view(self.active_view);
|
||||||
const primary = editor.get_primary();
|
const primary = editor.get_primary();
|
||||||
const row: usize = primary.cursor.row;
|
const row: usize = primary.cursor.row;
|
||||||
const col: usize = primary.cursor.col;
|
const col: usize = primary.cursor.col;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue