Merge pull request #578 from jonathandturner/fix_577

Fix line completion for extended chars
This commit is contained in:
Jonathan Turner 2019-09-03 07:09:26 +12:00 committed by GitHub
commit 4a00887e9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;