Commit 54e48e9c authored by Christian Hergert's avatar Christian Hergert
Browse files

contextengine: clear invalid ranges if BOM is found

If we came across a BOM at the beginning of a buffer, then we will have
an invalid range before we check for BOM. In that case, we need to to
clear it before we proceed or some assertions (such as invalid range == 1)
will not be met.

Fixes #30
parent 594d1a76
......@@ -5389,6 +5389,8 @@ update_syntax (GtkSourceContextEngine *ce,
gtk_text_iter_forward_char (&start_iter);
start_offset = gtk_text_iter_get_offset (&start_iter);
segment_remove (ce, invalid);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment