mirror of
https://github.com/nushell/nushell
synced 2024-11-14 08:57:08 +00:00
One more go at fixing scroll textarea in windows
This commit is contained in:
parent
501482cc31
commit
f2873edf6c
2 changed files with 16 additions and 1 deletions
|
@ -6,6 +6,7 @@ use nu::{
|
|||
Value,
|
||||
};
|
||||
use pretty_hex::*;
|
||||
use std::{thread, time::Duration};
|
||||
|
||||
struct BinaryView;
|
||||
|
||||
|
@ -444,6 +445,9 @@ pub fn view_contents_interactive(
|
|||
#[allow(unused)]
|
||||
let screen = RawScreen::disable_raw_mode();
|
||||
|
||||
println!("");
|
||||
thread::sleep(Duration::from_millis(50));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,9 @@ fn scroll_view_lines(lines: Vec<String>) {
|
|||
let cursor = cursor();
|
||||
let _ = cursor.hide();
|
||||
|
||||
let input = crossterm::input();
|
||||
let _ = input.read_async();
|
||||
|
||||
let mut size = paint_textview(&lines, starting_row);
|
||||
loop {
|
||||
if rawkey.is_pressed(rawkey::KeyCode::Escape) {
|
||||
|
@ -110,7 +113,15 @@ fn scroll_view_lines(lines: Vec<String>) {
|
|||
|
||||
let _ = cursor.show();
|
||||
}
|
||||
thread::sleep(Duration::from_millis(250));
|
||||
|
||||
let cursor = cursor();
|
||||
let _ = cursor.show();
|
||||
|
||||
#[allow(unused)]
|
||||
let screen = RawScreen::disable_raw_mode();
|
||||
|
||||
println!("");
|
||||
thread::sleep(Duration::from_millis(50));
|
||||
}
|
||||
|
||||
fn scroll_view(s: &str) {
|
||||
|
|
Loading…
Reference in a new issue