mirror of
https://github.com/nushell/nushell
synced 2025-01-13 21:55:07 +00:00
Fix line completion for extended chars
This commit is contained in:
parent
36c181706d
commit
95feb1ff16
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ impl NuCompleter {
|
|||
}
|
||||
}
|
||||
|
||||
let line_chars: Vec<_> = line.chars().collect();
|
||||
let mut replace_pos = pos;
|
||||
let line_chars: Vec<_> = line[..pos].chars().collect();
|
||||
let mut replace_pos = line_chars.len();
|
||||
while replace_pos > 0 {
|
||||
if line_chars[replace_pos - 1] == ' ' {
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue