![]() The positions passed to `Transaction::change_by_selection` should be character indexes. `edit_diff` is meant to track the number of characters that should be deleted to erase the file name that has been typed so far (if any). Mistakenly this was using `str::len` which is the byte count. This fixes a bug that could cause more text to be deleted than intended or a panic when completing a directory with multi-byte characters like 'éclair'. This change also moves the `edit_diff` binding out of the loop since it's now performing some non-trivial work (counting characters, where before it was just accessing the pre-computed number of bytes). |
||
---|---|---|
.. | ||
src | ||
tests | ||
.gitignore | ||
build.rs | ||
Cargo.toml |