Skip to content

Commit f668900

Browse files
authored
Merge pull request #1042 from julia-vscode/sp/more-robust-is_latex_comp
More robust is_latex_comp
2 parents 0cbf628 + c464519 commit f668900

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/requests/completions.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ function string_completion(t, state::CompletionState)
333333
end
334334

335335
function is_latex_comp(s, i)
336-
i0 = i
336+
firstindex(s) <= i <= lastindex(s) || return ""
337+
i0 = i = thisind(s, i)
337338
while firstindex(s) <= i
338339
s[i] == '\\' && return s[i:i0]
339340
!is_latex_comp_char(s[i]) && return ""

0 commit comments

Comments
 (0)