forked from extern/nushell
Update reedline, revert crossterm (#4657)
At the moment `crossterm` apparently has a regression decoding certain important key combinations on Windows. Thus reedline reverted to the previous version. Some changes are necessary to remove the need for `crossterm` in the use of `lscolors`. Introduces two local conversion traits. Additionally update the `Highlighter` API to support the cursor position. This will enable brace/statement match highlighting.
This commit is contained in:
committed by
GitHub
parent
d2bd71d2aa
commit
799fa98411
@ -40,7 +40,7 @@ impl Command for NuHighlight {
|
||||
input.map(
|
||||
move |x| match x.as_string() {
|
||||
Ok(line) => {
|
||||
let highlights = highlighter.highlight(&line);
|
||||
let highlights = highlighter.highlight(&line, line.len());
|
||||
|
||||
Value::String {
|
||||
val: highlights.render_simple(),
|
||||
|
@ -12,7 +12,7 @@ pub struct NuHighlighter {
|
||||
}
|
||||
|
||||
impl Highlighter for NuHighlighter {
|
||||
fn highlight(&self, line: &str) -> StyledText {
|
||||
fn highlight(&self, line: &str, _cursor: usize) -> StyledText {
|
||||
trace!("highlighting: {}", line);
|
||||
|
||||
let (shapes, global_span_offset) = {
|
||||
|
Reference in New Issue
Block a user