Skip to content

Commit

Permalink
fix: #52 updating focused buffer following close of windows as columns
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Nov 21, 2024
1 parent d249424 commit 7b539ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ui/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ impl Layout {
} else {
self.cols.focus.wins.remove_focused_unchecked();
}

let id = self.cols.focus.wins.focus.view.bufid;
self.buffers.focus_id(id);
self.update_screen_size(self.screen_rows, self.screen_cols);

false
Expand All @@ -224,7 +227,11 @@ impl Layout {
if self.cols.len() == 1 {
return true;
}

self.cols.remove_focused_unchecked();

let id = self.cols.focus.wins.focus.view.bufid;
self.buffers.focus_id(id);
self.update_screen_size(self.screen_rows, self.screen_cols);

false
Expand Down

0 comments on commit 7b539ba

Please sign in to comment.