SF.net SVN: geany-plugins:[301] trunk/spellcheck

eht16 at users.sourceforge.net eht16 at xxxxx
Sat Nov 15 19:01:18 UTC 2008


Revision: 301
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=301&view=rev
Author:   eht16
Date:     2008-11-15 19:01:18 +0000 (Sat, 15 Nov 2008)

Log Message:
-----------
Fix an endless loop and some mismatches in clearing indicators when using 'Add to Dictionary' and 'Ignore All'.

Modified Paths:
--------------
    trunk/spellcheck/ChangeLog
    trunk/spellcheck/src/gui.c

Modified: trunk/spellcheck/ChangeLog
===================================================================
--- trunk/spellcheck/ChangeLog	2008-11-15 18:38:31 UTC (rev 300)
+++ trunk/spellcheck/ChangeLog	2008-11-15 19:01:18 UTC (rev 301)
@@ -11,6 +11,8 @@
    Remove the limit of showing a maximum of 10 suggestions, instead
    add sub menus for more suggestions if available, similar to what
    'gtkspell' does.
+   Fix an endless loop and some mismatches in clearing indicators when
+   using 'Add to Dictionary' and 'Ignore All'.
 
 
 2008-11-12  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/spellcheck/src/gui.c
===================================================================
--- trunk/spellcheck/src/gui.c	2008-11-15 18:38:31 UTC (rev 300)
+++ trunk/spellcheck/src/gui.c	2008-11-15 19:01:18 UTC (rev 301)
@@ -211,15 +211,17 @@
 		if (startword >= 0)
 		{
 			endword = p_sci->send_message(sci, SCI_INDICATOREND, 0, startword);
+			if (startword == endword)
+				continue;
 
 			if (str->len < (guint)(endword - startword + 1))
 				str = g_string_set_size(str, endword - startword + 1);
 			p_sci->get_text_range(sci, startword, endword, str->str);
 
-			if (strncmp(str->str, clickinfo.word, str->len) == 0)
+			if (strcmp(str->str, clickinfo.word) == 0)
 				p_sci->indicator_clear(sci, startword, endword - startword);
 
-			i = endword + 1;
+			i = endword;
 		}
 	}
 	g_string_free(str, TRUE);


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



More information about the Plugins-Commits mailing list