diff --git a/ChangeLog b/ChangeLog index d5ada41e..f5eba57d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,9 @@ * src/editor.c: Fix possible segfault for XML tag completion when no '<' brace could be found. + * src/document.c: + Ensure all opened documents are colourised before being drawn + (should happen anyway in document_set_filetype(), but just in case). 2008-07-03 Enrico Tröger diff --git a/src/document.c b/src/document.c index 9601bf42..5e7b7843 100644 --- a/src/document.c +++ b/src/document.c @@ -1010,6 +1010,7 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename /* add the text to the ScintillaObject */ sci_set_readonly(doc->sci, FALSE); /* to allow replacing text */ sci_set_text(doc->sci, filedata.data); /* NULL terminated data */ + queue_colourise(doc); /* Ensure the document gets colourised. */ /* detect & set line endings */ editor_mode = utils_get_line_endings(filedata.data, filedata.len); @@ -1049,9 +1050,6 @@ GeanyDocument *document_open_file_full(GeanyDocument *doc, const gchar *filename { /* reloading */ document_undo_clear(doc); - /* Ensure the document gets colourised. - * (The text could have changed without typenames changing.) */ - queue_colourise(doc); use_ft = ft; } /* update taglist, typedef keywords and build menu if necessary */