Index: gtk/gtktextview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextview.c,v
retrieving revision 1.221
diff -u -b -B -p -r1.221 gtktextview.c
--- gtk/gtktextview.c	21 Jan 2003 22:31:29 -0000	1.221
+++ gtk/gtktextview.c	23 Jan 2003 23:52:54 -0000
@@ -1456,7 +1456,10 @@ gtk_text_view_scroll_to_iter (GtkTextVie
   if (screen.height < 1)
     screen.height = 1;
   
-  screen_right = screen.x + screen.width;
+  /* The -1 here ensures that we leave enough space to draw the cursor
+   * when this function is used for horizontal scrolling. 
+   */
+  screen_right = screen.x + screen.width - 1;
   screen_bottom = screen.y + screen.height;
   
   /* The alignment affects the point in the target character that we
@@ -1693,6 +1696,9 @@ gtk_text_view_update_adjustments (GtkTex
 
   if (text_view->layout)
     gtk_text_layout_get_size (text_view->layout, &width, &height);
+
+  /* Make room for the cursor after the last character in the widest line */
+  width++;
 
   if (text_view->width != width || text_view->height != height)
     {
