summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-10-27 18:54:28 +0000
committerGitHub <noreply@github.com>2018-10-27 18:54:28 +0000
commita54cc4ec60b374fd3fd57af204be8de1c242f4cc (patch)
tree34c8554f3fda7b62fafc32254e2b62091c1cc46f
parenta9397727d2a0d07a0a3aeed83a21e44c638677ef (diff)
Refactor platform-specific code
-rw-r--r--src/main.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index c6b15b72..1a887a90 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -175,7 +175,7 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> {
#[cfg(windows)]
let resize_handle = unsafe { &mut *pty.winpty.get() };
#[cfg(not(windows))]
- let mut resize_handle = pty.fd.as_raw_fd();
+ let resize_handle = &mut pty.fd.as_raw_fd();
// Create the pseudoterminal I/O loop
//
@@ -246,14 +246,12 @@ fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> {
if terminal_lock.needs_draw() {
// Try to update the position of the input method editor
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.
- #[cfg(windows)]
display.handle_resize(&mut terminal_lock, &config, &mut [resize_handle, &mut processor]);
- #[cfg(not(windows))]
- display.handle_resize(&mut terminal_lock, &config, &mut [&mut resize_handle, &mut processor]);
drop(terminal_lock);