Revision: 2633 http://geany.svn.sourceforge.net/geany/?rev=2633&view=rev Author: ntrel Date: 2008-06-02 08:52:00 -0700 (Mon, 02 Jun 2008)
Log Message: ----------- Fix possible document double-colourise after reloading a file.
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-02 15:50:56 UTC (rev 2632) +++ trunk/ChangeLog 2008-06-02 15:52:00 UTC (rev 2633) @@ -11,6 +11,11 @@ Add DOCUMENT() macro to convert a GeanyDocument* to a Document*. Also move UNDO_*, FileEncoding to documentprivate.h. Move undo_action struct to document.c. + * src/utils.c: + Reload a changed document immediately on user clicking reload + (waiting was not related to the now fixed reload-colourise problem). + * src/document.c: + Fix possible document double-colourise after reloading a file.
2008-05-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-06-02 15:50:56 UTC (rev 2632) +++ trunk/src/document.c 2008-06-02 15:52:00 UTC (rev 2633) @@ -1107,11 +1107,10 @@ else { /* reloading */ document_undo_clear(idx); - /* Recolour the document after reloading because the text could have changed - * without typenames changing. - * Note: This could cause double colourising of the current document if typenames have - * also changed, but it shouldn't be that noticeable. */ - sci_colourise(documents[idx]->sci, 0, -1); + + /* Unset the filetype so the document gets colourised by document_set_filetype(). + * (The text could have changed without typenames changing.) */ + documents[idx]->file_type = NULL; use_ft = ft; } /* update taglist, typedef keywords and build menu if necessary */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.