mirror of
https://github.com/nushell/nushell
synced 2024-11-11 07:34:14 +00:00
Improve completions inside of a pipeline (#3575)
* Fix completion crash * Improve inner completions
This commit is contained in:
parent
bc6fa85a4b
commit
2e968d2557
1 changed files with 7 additions and 5 deletions
|
@ -228,11 +228,13 @@ pub fn completion_location(line: &str, block: &Block, pos: usize) -> Vec<Complet
|
|||
item: LocationType::Command,
|
||||
} = &rloc
|
||||
{
|
||||
output.push(LocationType::Command.spanned(Span::new(
|
||||
span.start(),
|
||||
locations[locations.len() - 1].span.end(),
|
||||
)));
|
||||
break;
|
||||
if span.start() <= pos {
|
||||
output.push(
|
||||
LocationType::Command
|
||||
.spanned(Span::new(span.start(), pos)),
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue