62 lines
2.3 KiB
Diff
62 lines
2.3 KiB
Diff
Index: gtk/gtktextview.c
|
|
===================================================================
|
|
--- gtk/gtktextview.c.orig
|
|
+++ gtk/gtktextview.c
|
|
@@ -6043,29 +6043,6 @@ gtk_text_view_ensure_layout (GtkTextView
|
|
G_CALLBACK (gtk_text_view_child_allocated),
|
|
text_view);
|
|
|
|
- if (get_buffer (text_view))
|
|
- gtk_text_layout_set_buffer (text_view->layout, get_buffer (text_view));
|
|
-
|
|
- if ((GTK_WIDGET_HAS_FOCUS (text_view) && text_view->cursor_visible))
|
|
- gtk_text_view_pend_cursor_blink (text_view);
|
|
- else
|
|
- gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
|
|
-
|
|
- gtk_text_layout_set_overwrite_mode (text_view->layout,
|
|
- text_view->overwrite_mode && text_view->editable);
|
|
-
|
|
- ltr_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
- pango_context_set_base_dir (ltr_context, PANGO_DIRECTION_LTR);
|
|
- rtl_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
- pango_context_set_base_dir (rtl_context, PANGO_DIRECTION_RTL);
|
|
-
|
|
- gtk_text_layout_set_contexts (text_view->layout, ltr_context, rtl_context);
|
|
-
|
|
- g_object_unref (ltr_context);
|
|
- g_object_unref (rtl_context);
|
|
-
|
|
- gtk_text_view_check_keymap_direction (text_view);
|
|
-
|
|
style = gtk_text_attributes_new ();
|
|
|
|
gtk_widget_ensure_style (widget);
|
|
@@ -6088,6 +6065,26 @@ gtk_text_view_ensure_layout (GtkTextView
|
|
|
|
gtk_text_attributes_unref (style);
|
|
|
|
+ if (get_buffer (text_view))
|
|
+ gtk_text_layout_set_buffer (text_view->layout, get_buffer (text_view));
|
|
+
|
|
+ if ((GTK_WIDGET_HAS_FOCUS (text_view) && text_view->cursor_visible))
|
|
+ gtk_text_view_pend_cursor_blink (text_view);
|
|
+ else
|
|
+ gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
|
|
+
|
|
+ ltr_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
+ pango_context_set_base_dir (ltr_context, PANGO_DIRECTION_LTR);
|
|
+ rtl_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
+ pango_context_set_base_dir (rtl_context, PANGO_DIRECTION_RTL);
|
|
+
|
|
+ gtk_text_layout_set_contexts (text_view->layout, ltr_context, rtl_context);
|
|
+
|
|
+ g_object_unref (ltr_context);
|
|
+ g_object_unref (rtl_context);
|
|
+
|
|
+ gtk_text_view_check_keymap_direction (text_view);
|
|
+
|
|
/* Set layout for all anchored children */
|
|
|
|
tmp_list = text_view->children;
|