don't trust locations returned by the compiler
This commit is contained in:
parent
bdfecd6fd3
commit
fccbafa75b
|
@ -199,7 +199,7 @@ class read_phrase ~term = object(self)
|
||||||
(* Highlight error locations. *)
|
(* Highlight error locations. *)
|
||||||
List.iter
|
List.iter
|
||||||
(fun (start, stop) ->
|
(fun (start, stop) ->
|
||||||
for i = start to stop - 1 do
|
for i = max 0 start to min (Array.length styled) stop - 1 do
|
||||||
let ch, style = styled.(i) in
|
let ch, style = styled.(i) in
|
||||||
styled.(i) <- (ch, { style with LTerm_style.underline = Some true })
|
styled.(i) <- (ch, { style with LTerm_style.underline = Some true })
|
||||||
done)
|
done)
|
||||||
|
|
Loading…
Reference in New Issue