Skip to content

Commit 67bc479

Browse files
committed
Fix incorrect calculation of number of bytes processed
Fixes errors when loaded with Revise
1 parent 6f89f64 commit 67bc479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hooks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ function Base.parse(str::AbstractString, pos::Int; greedy::Bool=true, raise::Boo
6969
if ps.errored
7070
diag = REPLDiagnostic(ps.error_code, "REPL", str, ps.diagnostics)
7171
raise && throw(diag)
72-
return is_incomplete(diag) ? Expr(:incomplete, diag) : Expr(:error, diag), position(io) + 1
72+
return is_incomplete(diag) ? Expr(:incomplete, diag) : Expr(:error, diag), pos + result.fullspan
7373
end
74-
Expr(result), position(io) + 1
74+
Expr(result), pos + result.fullspan
7575
end
7676

7777
function Base.incomplete_tag(ex::Expr)

0 commit comments

Comments
 (0)