diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs index 0888c9b5..03a372df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -173,7 +173,7 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> { // Main display loop loop { // Process input and window events - let mut terminal = processor.process_events(&terminal, display.window()); + let mut terminal_lock = processor.process_events(&terminal, display.window()); // Handle config reloads if let Some(new_config) = config_monitor @@ -183,22 +183,23 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> { config = new_config.update_dynamic_title(options); display.update_config(&config); processor.update_config(&config); - terminal.update_config(&config); - terminal.dirty = true; + terminal_lock.update_config(&config); + terminal_lock.dirty = true; } // Maybe draw the terminal - if terminal.needs_draw() { + if terminal_lock.needs_draw() { // Try to update the position of the input method editor - display.update_ime_position(&terminal); + display.update_ime_position(&terminal_lock); // Handle pending resize events // // The second argument is a list of types that want to be notified // of display size changes. - display.handle_resize(&mut terminal, &config, &mut [&mut pty, &mut processor]); + display.handle_resize(&mut terminal_lock, &config, &mut [&mut pty, &mut processor]); + drop(terminal_lock); // Draw the current state of the terminal - display.draw(terminal, &config); + display.draw(&terminal, &config); } // Begin shutdown if the flag was raised. |