Fix bug where exit-to-editor may use wrong position in certain cases.
This could happen in certain situations where an error is detected at the end of a line (for example with "cannot redefine a macro" errors). Fixes #40.
This commit is contained in:
parent
f70f03d473
commit
d33ac61af3
|
@ -630,8 +630,12 @@ if list or (numErr <> 0) then begin
|
|||
end; {case}
|
||||
writeln(msg^);
|
||||
if terminalErrors then begin
|
||||
if enterEditor then
|
||||
ExitToEditor(msg, ord4(firstPtr)+col-ord4(bofPtr)-1)
|
||||
if enterEditor then begin
|
||||
if line = lineNumber then
|
||||
ExitToEditor(msg, ord4(firstPtr)+col-ord4(bofPtr)-1)
|
||||
else
|
||||
ExitToEditor(msg, ord4(firstPtr)-ord4(bofPtr)-1);
|
||||
end {if}
|
||||
else
|
||||
TermError(0);
|
||||
end; {if}
|
||||
|
|
Loading…
Reference in New Issue