Fix line completion for extended chars

This commit is contained in:
Jonathan Turner 2019-09-03 06:06:25 +12:00
parent 36c181706d
commit 95feb1ff16

View file

@ -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;