Fix tab completion segfault in reverse search
Merge pull request #8315 from JuliaLang/anj/fixtab

Fix tab completion segfault in reverse search