Commit 7f301cf8 authored by Paolo Borelli's avatar Paolo Borelli

Remove useless get_iter_at_line calls.

No need to call _gtk_text_btree_get_iter_at_line right before calling
totally_invisible_line, since it is the first thing it does itself.
parent bbf96b9e
......@@ -1968,9 +1968,6 @@ update_text_display_cursors (GtkTextLayout *layout,
display->cursors_invalid = FALSE;
_gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
&iter, line, 0);
/* Special-case optimization for completely
* invisible lines; makes it faster to deal
* with sequences of invisible lines.
......@@ -2157,9 +2154,6 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
display->line = line;
display->insert_index = -1;
_gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
&iter, line, 0);
/* Special-case optimization for completely
* invisible lines; makes it faster to deal
* with sequences of invisible lines.
......@@ -3572,12 +3566,8 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
do
{
line = _gtk_text_line_previous (line);
if (!line)
goto done;
_gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
&lineiter, line, 0);
}
while (totally_invisible_line (layout, line, &lineiter));
......@@ -3593,12 +3583,9 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
line = _gtk_text_line_next_excluding_last (line);
if (!line)
goto done;
_gtk_text_btree_get_iter_at_line (_gtk_text_buffer_get_btree (layout->buffer),
&lineiter, line, 0);
}
while (totally_invisible_line (layout, line, &lineiter));
gtk_text_layout_free_line_display (layout, display);
display = gtk_text_layout_get_line_display (layout, line, FALSE);
new_index = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment