refactor: update Buffer.last_view when navigating

This commit is contained in:
CJ van den Berg 2026-01-14 20:16:37 +01:00
parent 94e6965ad0
commit 1263d3c9e8
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -1534,6 +1534,8 @@ pub fn location_update_from_editor(self: *Self) void {
const editor = self.get_active_editor() orelse return;
const file_path = editor.file_path orelse return;
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 row: usize = primary.cursor.row;
const col: usize = primary.cursor.col;