* Changes in the autotools stuff affecting a lot of platform dependent
[modest] / src / widgets / modest-scroll-text.c
index 25f6426..a2b2c93 100644 (file)
@@ -97,14 +97,12 @@ size_request (GtkWidget *widget,
 
        /* Count lines in text view */
        for (line = 0; line < line_limit; line++) {
 
        /* Count lines in text view */
        for (line = 0; line < line_limit; line++) {
-               if (!gtk_text_view_forward_display_line (GTK_TEXT_VIEW (text_view), &iter))
+               if (!gtk_text_view_forward_display_line_end (GTK_TEXT_VIEW (text_view), &iter))
                        break;
                        break;
+               else 
+                       gtk_text_view_forward_display_line (GTK_TEXT_VIEW (text_view), &iter);
        }
 
        }
 
-       /* Put again the cursor in the first character. Also scroll to first line */
-       gtk_text_buffer_place_cursor (buffer, &insert_iter);
-       gtk_text_view_place_cursor_onscreen (GTK_TEXT_VIEW (text_view));
-
        /* Change the adjustment properties for one line per step behavior */
        adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (widget));
        if (adj != NULL) {
        /* Change the adjustment properties for one line per step behavior */
        adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (widget));
        if (adj != NULL) {
@@ -125,6 +123,10 @@ size_request (GtkWidget *widget,
                
        priv->line_height = iter_rectangle.height;
 
                
        priv->line_height = iter_rectangle.height;
 
+       /* Put again the cursor in the first character. Also scroll to first line */
+       gtk_text_buffer_place_cursor (buffer, &insert_iter);
+       gtk_text_view_scroll_mark_onscreen (GTK_TEXT_VIEW (text_view), insert_mark);
+
 }
 
 static void
 }
 
 static void