forked from AuroraMiddleware/gtk
textbuffer: Fix a test failure
The previous change to gtktextbuffer.c was breaking the textiter testcase.
This commit is contained in:
parent
0add626822
commit
4340f75304
@ -1605,10 +1605,14 @@ insert_range_not_inside_self (GtkTextBuffer *buffer,
|
|||||||
GtkTextIter end = *orig_end;
|
GtkTextIter end = *orig_end;
|
||||||
GtkTextIter range_start;
|
GtkTextIter range_start;
|
||||||
GtkTextIter range_end;
|
GtkTextIter range_end;
|
||||||
|
gboolean insert_tags;
|
||||||
|
|
||||||
if (gtk_text_iter_equal (orig_start, orig_end))
|
if (gtk_text_iter_equal (orig_start, orig_end))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
insert_tags = gtk_text_buffer_get_tag_table (gtk_text_iter_get_buffer (orig_start))
|
||||||
|
== gtk_text_buffer_get_tag_table (buffer);
|
||||||
|
|
||||||
gtk_text_iter_order (&start, &end);
|
gtk_text_iter_order (&start, &end);
|
||||||
|
|
||||||
range_start = start;
|
range_start = start;
|
||||||
@ -1647,7 +1651,7 @@ insert_range_not_inside_self (GtkTextBuffer *buffer,
|
|||||||
restore_range (r);
|
restore_range (r);
|
||||||
r = NULL;
|
r = NULL;
|
||||||
|
|
||||||
if (gtk_text_buffer_get_tag_table (gtk_text_iter_get_buffer (orig_start)) == gtk_text_buffer_get_tag_table (buffer))
|
if (insert_tags)
|
||||||
{
|
{
|
||||||
gtk_text_buffer_get_iter_at_offset (buffer, &start_iter, start_offset);
|
gtk_text_buffer_get_iter_at_offset (buffer, &start_iter, start_offset);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user