Skip to content

Commit

Permalink
remove drop call
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Aug 17, 2024
1 parent 501dc23 commit aacf2b7
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions frontends/rioterm/src/screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,24 +1201,21 @@ impl Screen<'_> {
// let start = std::time::Instant::now();
// println!("Render time elapsed");

#[cfg(use_wa)]
if self.sugarloaf.dimensions_changed() {
self.resize_all_contexts();
return;
let (rows, cursor, display_offset, has_blinking_enabled) = {
let terminal = self.ctx().current().terminal.lock();
(
terminal.visible_rows(),
terminal.cursor(),
terminal.display_offset(),
terminal.blinking_cursor,
)
};

let terminal = self.ctx().current().terminal.lock();
let visible_rows = terminal.visible_rows();
let cursor = terminal.cursor();
let display_offset = terminal.display_offset();
let has_blinking_enabled = terminal.blinking_cursor;
drop(terminal);
self.context_manager.update_titles();

self.state.set_ime(self.ime.preedit());

self.state.prepare_term(
visible_rows,
rows,
cursor,
&mut self.sugarloaf,
&self.context_manager,
Expand Down

0 comments on commit aacf2b7

Please sign in to comment.