Skip to content

Commit

Permalink
fix autocompleting in cmd (#25410)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Jan 7, 2018
1 parent d9f482d commit bbcd773
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/repl/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ function completions(string, pos)

# otherwise...
if inc_tag in [:cmd, :string]
m = match(r"[\t\n\r\"><=*?|]| (?!\\)", reverse(partial))
m = match(r"[\t\n\r\"`><=*?|]| (?!\\)", reverse(partial))
startpos = nextind(partial, reverseind(partial, m.offset))
r = startpos:pos

Expand Down
7 changes: 7 additions & 0 deletions test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ let s = "Pkg.add(\"lol"
@test res == false
end

# inexistent completion inside a cmd
let s = "run(`lol"
c, r, res = test_complete(s)
@test res == false
end

# test latex symbol completions
let s = "\\alpha"
c, r = test_bslashcomplete(s)
Expand Down Expand Up @@ -888,3 +894,4 @@ test_dict_completion("test_repl_comp_customdict")
c, r, res = test_complete("CompletionFoo.tϵsτc")
@test "tϵsτcmδ`" in c
end

0 comments on commit bbcd773

Please sign in to comment.