mirror of
https://github.com/nushell/nushell
synced 2025-01-14 14:14:13 +00:00
nu-cli/completions: send original line to custom completer (#5459)
This commit is contained in:
parent
2dfd975940
commit
b0647f780d
1 changed files with 2 additions and 1 deletions
|
@ -56,6 +56,7 @@ impl NuCompleter {
|
|||
fn completion_helper(&mut self, line: &str, pos: usize) -> Vec<Suggestion> {
|
||||
let mut working_set = StateWorkingSet::new(&self.engine_state);
|
||||
let offset = working_set.next_span_start();
|
||||
let initial_line = line.to_string();
|
||||
let mut line = line.to_string();
|
||||
line.insert(pos, 'a');
|
||||
let pos = offset + pos;
|
||||
|
@ -150,7 +151,7 @@ impl NuCompleter {
|
|||
self.engine_state.clone(),
|
||||
self.stack.clone(),
|
||||
*decl_id,
|
||||
line,
|
||||
initial_line,
|
||||
);
|
||||
|
||||
return self.process_completion(
|
||||
|
|
Loading…
Reference in a new issue