Update crossterm version to 0.26 (#8623)

# Description

This pr is a companion to https://github.com/nushell/reedline/pull/560

Fortunally, we don't need to change too much nushell code.

## Additional note about lscolor dependency
https://github.com/sharkdp/lscolors/pull/58~~
lscolor is using 0.26 for now
This commit is contained in:
WindSoilder
2023-04-15 04:14:57 +08:00
committed by GitHub
parent 71611dec4f
commit 9b35d59023
13 changed files with 338 additions and 291 deletions

View File

@ -5,7 +5,7 @@ use crate::{
util::eval_source,
NuHighlighter, NuValidator, NushellPrompt,
};
use crossterm::cursor::CursorShape;
use crossterm::cursor::SetCursorStyle;
use log::{trace, warn};
use miette::{IntoDiagnostic, Result};
use nu_color_config::StyleComputer;
@ -707,11 +707,11 @@ pub fn evaluate_repl(
Ok(())
}
fn map_nucursorshape_to_cursorshape(shape: NuCursorShape) -> CursorShape {
fn map_nucursorshape_to_cursorshape(shape: NuCursorShape) -> SetCursorStyle {
match shape {
NuCursorShape::Block => CursorShape::Block,
NuCursorShape::UnderScore => CursorShape::UnderScore,
NuCursorShape::Line => CursorShape::Line,
NuCursorShape::Block => SetCursorStyle::SteadyBlock,
NuCursorShape::UnderScore => SetCursorStyle::DefaultUserShape,
NuCursorShape::Line => SetCursorStyle::BlinkingBar,
}
}