diff --git a/src/plugins/textview.rs b/src/plugins/textview.rs index c3c313e4e..b5899ac19 100644 --- a/src/plugins/textview.rs +++ b/src/plugins/textview.rs @@ -134,7 +134,7 @@ fn scroll_view_lines_if_needed(draw_commands: Vec, use_color_buffer let input = crossterm::input(); - let mut use_rawkey = false; + let use_rawkey; let mut sync_stdin = None; #[cfg(target_os = "linux")] @@ -142,9 +142,16 @@ fn scroll_view_lines_if_needed(draw_commands: Vec, use_color_buffer // if we're in Linux but not X11, we need to avoid using rawkey for now if std::env::var("DISPLAY").is_err() { use_rawkey = false; + } else { + use_rawkey = true; } } + #[cfg(not(target_os = "linux"))] + { + use_rawkey = true + } + if use_rawkey { let _ = input.read_async(); } else {