Skip to content

Commit

Permalink
fix scroll resetting when opening file
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Dec 9, 2024
1 parent ef0c25f commit 11d5c77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/ferrite-core/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,15 @@ impl Engine {
Some((id, buffer)) => {
buffer.update_interact(None);
let view_id = buffer.create_view();
if let Some(buffer_data) = self
.workspace
.buffer_extra_data
.iter()
.find(|b| b.path == real_path)
{
buffer.load_view_data(view_id, buffer_data);
buffer.load_buffer_data(buffer_data);
}
let replaced = self
.workspace
.panes
Expand Down

0 comments on commit 11d5c77

Please sign in to comment.