Skip to content

Commit

Permalink
allow LaTeX tab-substitutions in comments and substitutions ending wi…
Browse files Browse the repository at this point in the history
…th ( (see #6927)
  • Loading branch information
stevengj committed May 23, 2014
1 parent 0b57b46 commit d707cb8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions base/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ function completions(string, pos)
paths[1] *= "\""
end
return sort(paths), r, true
elseif inc_tag == :other && string[pos] == '('
endpos = prevind(string, pos)
startpos = nextind(string, rsearch(string, non_identifier_chars, endpos))
return complete_methods(string[startpos:endpos]), startpos:endpos, false
elseif inc_tag == :comment
return UTF8String[], 0:-1, false
end

slashpos = rsearch(string, '\\', pos)
Expand All @@ -182,6 +176,14 @@ function completions(string, pos)
end
end

if inc_tag == :other && string[pos] == '('
endpos = prevind(string, pos)
startpos = nextind(string, rsearch(string, non_identifier_chars, endpos))
return complete_methods(string[startpos:endpos]), startpos:endpos, false
elseif inc_tag == :comment
return UTF8String[], 0:-1, false
end

dotpos = rsearch(string, '.', pos)
startpos = nextind(string, rsearch(string, non_identifier_chars, pos))

Expand Down

0 comments on commit d707cb8

Please sign in to comment.