src/gtkdebug.c

changeset 11310
18461cc48950
parent 11262
561da6ec5c26
child 11311
0deea6aaea65
equal deleted inserted replaced
11309:ef00c1d2645e 11310:18461cc48950
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,

mercurial