Mercurial > pidgin
comparison src/gtkdebug.c @ 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 | ecbbe6d18b0d |
| children | 674abdc2b9be |
comparison
equal
deleted
inserted
replaced
| 11309:2934ab3a6c89 | 11310:0058b0737e76 |
|---|---|
| 331 gtk_text_buffer_get_insert(imhtml->text_buffer)); | 331 gtk_text_buffer_get_insert(imhtml->text_buffer)); |
| 332 i = gtk_text_iter_get_offset(&ins); | 332 i = gtk_text_iter_get_offset(&ins); |
| 333 | 333 |
| 334 gtk_imhtml_append_text(imhtml, text, 0); | 334 gtk_imhtml_append_text(imhtml, text, 0); |
| 335 | 335 |
| 336 if(!win->highlight) { | 336 /* If we're not highlighting and the expression isn't inverted, |
| 337 * we're done and move on. | |
| 338 */ | |
| 339 if(!win->highlight || inverted == REG_NOMATCH) { | |
| 337 g_free(plaintext); | 340 g_free(plaintext); |
| 338 return; | 341 return; |
| 339 } | 342 } |
| 340 | 343 |
| 341 /* we use a do-while to highlight the first match, and then continue | 344 /* we use a do-while to highlight the first match, and then continue |
| 344 do { | 347 do { |
| 345 gint m; | 348 gint m; |
| 346 | 349 |
| 347 for(m = 0; m < n_matches; m++) { | 350 for(m = 0; m < n_matches; m++) { |
| 348 GtkTextIter ms, me; | 351 GtkTextIter ms, me; |
| 349 | 352 |
| 350 if(matches[m].rm_eo == -1) | 353 if(matches[m].rm_eo == -1) |
| 351 break; | 354 break; |
| 352 | 355 |
| 353 i += offset; | 356 i += offset; |
| 354 | 357 |
| 355 gtk_text_buffer_get_iter_at_offset(imhtml->text_buffer, &ms, | 358 gtk_text_buffer_get_iter_at_offset(imhtml->text_buffer, &ms, |
