changeset 11310:0058b0737e76

[gaim-migrate @ 13510] Turned off highlighting for inverted expressions. Bleeter was having infinite loop problems because of it and I was segfaulting. We can turn this back on but then we need to initialize the matches array. I just disabled it because it doesn't make much sense to highlight entire lines that don't match your expression. committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Fri, 19 Aug 2005 06:36:58 +0000
parents 2934ab3a6c89
children 674abdc2b9be
files src/gtkdebug.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkdebug.c	Fri Aug 19 05:26:16 2005 +0000
+++ b/src/gtkdebug.c	Fri Aug 19 06:36:58 2005 +0000
@@ -333,7 +333,10 @@
 
 		gtk_imhtml_append_text(imhtml, text, 0);
 
-		if(!win->highlight) {
+		/* If we're not highlighting and the expression isn't inverted,
+		 * we're done and move on.
+		 */
+		if(!win->highlight || inverted == REG_NOMATCH) {
 			g_free(plaintext);
 			return;
 		}
@@ -346,8 +349,8 @@
 
 			for(m = 0; m < n_matches; m++) {
 				GtkTextIter ms, me;
-
-				if(matches[m].rm_eo == -1)
+				
+				if(matches[m].rm_eo == -1) 
 					break;
 
 				i += offset;