SF.net SVN: geany:[4614] branches/geany-0.18.1

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jan 31 16:28:04 UTC 2010


Revision: 4614
          http://geany.svn.sourceforge.net/geany/?rev=4614&view=rev
Author:   eht16
Date:     2010-01-31 16:28:04 +0000 (Sun, 31 Jan 2010)

Log Message:
-----------
Backport from trunk:
Allow autocompletion for HTML entities even within a word.

Modified Paths:
--------------
    branches/geany-0.18.1/ChangeLog
    branches/geany-0.18.1/src/editor.c

Modified: branches/geany-0.18.1/ChangeLog
===================================================================
--- branches/geany-0.18.1/ChangeLog	2010-01-31 16:27:40 UTC (rev 4613)
+++ branches/geany-0.18.1/ChangeLog	2010-01-31 16:28:04 UTC (rev 4614)
@@ -41,6 +41,8 @@
  * src/vte.c:
    Remove useless comment about applying settings only when libvte.so
    could be loaded which is only displayed *if* libvte.so is loaded.
+ * src/editor.c:
+   Allow autocompletion for HTML entities even within a word.
 
 
 2009-10-26  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: branches/geany-0.18.1/src/editor.c
===================================================================
--- branches/geany-0.18.1/src/editor.c	2010-01-31 16:27:40 UTC (rev 4613)
+++ branches/geany-0.18.1/src/editor.c	2010-01-31 16:28:04 UTC (rev 4614)
@@ -1898,6 +1898,15 @@
 	{
 		if (autocomplete_check_for_html(ft->id, style))
 		{
+			/* Allow something like ""some text"". The above startword calculation
+			 * only works on words but for HTML entity completion we also want to have completion
+			 * based on '&' within words. */
+			gchar *tmp = strchr(root, '&');
+			if (tmp != NULL)
+			{
+				root = tmp;
+				rootlen = strlen(tmp);
+			}
 			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