Commit 06a9d375 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 9b845395
......@@ -5381,6 +5381,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);
CHECK_TREE (ce);
}
}
......
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