Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix starting range in REPLCompletions (JuliaLang#49547)
The new completion for `var"` fields (JuliaLang#49294) failed when the `var"` was at the end of the completion query, e.g. in `WeirdNames().var"`. This is because we have the following behavior: ``` julia> findprev(==('x'), "x", 1) 1 julia> findprev(==('x'), "x", 2) ``` REPLCompletions attempt to find `.` starting after the `var"`, which in this case is at the end of the string. Of course, the index was probably off by one anyway, because we didn't want to match `var".`, but nevertheless, I find this behavior surprising (ref also [1]). For now, fix this by starting the search before the `var"`, but we may want to revisit the `findprev` behavior also. [1] https://github.com/JuliaLang/julia/pull/35742/files#r420945975
- Loading branch information