Ensure all opened documents are colourised before being drawn

(should happen anyway in document_set_filetype(), but just in case).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2751 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-07-03 17:21:29 +00:00
parent 8f4106b066
commit 4b34a992c2
2 changed files with 4 additions and 3 deletions

View File

@ -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 <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -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 */