mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Allow aliases to expand and ignore painting outside of lines (#3492)
This commit is contained in:
@ -374,6 +374,10 @@ impl FromValue for Vec<Value> {
|
||||
value: UntaggedValue::Table(t),
|
||||
..
|
||||
} => Ok(t.clone()),
|
||||
Value {
|
||||
value: UntaggedValue::Row(_),
|
||||
..
|
||||
} => Ok(vec![v.clone()]),
|
||||
Value { tag, .. } => Err(ShellError::labeled_error(
|
||||
"Can't convert to table",
|
||||
"can't convert to table",
|
||||
|
@ -46,7 +46,9 @@ impl Painter {
|
||||
|
||||
fn paint(&mut self, styled_span: &Spanned<Style>) {
|
||||
for pos in styled_span.span.start()..styled_span.span.end() {
|
||||
self.styles[pos] = styled_span.item;
|
||||
if pos < self.styles.len() {
|
||||
self.styles[pos] = styled_span.item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user