SF.net SVN: geany: [2242] trunk/src/editor.c

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Feb 10 12:35:14 UTC 2008


Revision: 2242
          http://geany.svn.sourceforge.net/geany/?rev=2242&view=rev
Author:   eht16
Date:     2008-02-10 04:35:11 -0800 (Sun, 10 Feb 2008)

Log Message:
-----------
Add workaround for a Scintilla bug in HTML/PHP lexer which styles the last line of document wrong when in PHP mode.

Modified Paths:
--------------
    trunk/src/editor.c

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2008-02-10 12:34:28 UTC (rev 2241)
+++ trunk/src/editor.c	2008-02-10 12:35:11 UTC (rev 2242)
@@ -1048,7 +1048,9 @@
 
 	// entity autocompletion always in a HTML file, in a PHP file only when we are outside of <? ?>
 	if (ft->id == GEANY_FILETYPES_HTML ||
-		(ft->id == GEANY_FILETYPES_PHP && (style < SCE_HPHP_DEFAULT || style > SCE_HPHP_OPERATOR)))
+		(ft->id == GEANY_FILETYPES_PHP && (style < SCE_HPHP_DEFAULT || style > SCE_HPHP_OPERATOR) &&
+		 line != (sci_get_line_count(sci) - 1))) // this check is a workaround for a Scintilla bug:
+												 // the last line in a PHP gets wrong styling
 		ret = autocomplete_html(sci, root, rootlen);
 	else
 	{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list