summaryrefslogtreecommitdiff
path: root/gtk/gtktextdisplay.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2000-11-15 21:12:58 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-11-15 21:12:58 +0000
commitde49f2ce050d3581d848137ec037fcd3a92385d9 (patch)
treec7f03e9e42685af709721f0dae3d4bf13f3858db /gtk/gtktextdisplay.c
parentc990d4ab1a1598cb9b252159f5b3730c3f96e7a4 (diff)
downloadgtk+-de49f2ce050d3581d848137ec037fcd3a92385d9.tar.gz
ed Nov 15 16:02:20 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextview.c (changed_handler): Call scroll_calc_now() unconditionally, since we may need to update the horizontal scrollbars even if the height didn't change. * gtk/gtktextlayout.c (add_preedit_attrs): Always get the extra attrs, since some of them affect size. * gtk/gtktextdisplay.c (gtk_text_layout_draw): Factor in x_offset correctly.
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r--gtk/gtktextdisplay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c
index ebe457549c..104a278ecf 100644
--- a/gtk/gtktextdisplay.c
+++ b/gtk/gtktextdisplay.c
@@ -668,8 +668,8 @@ void
gtk_text_layout_draw (GtkTextLayout *layout,
GtkWidget *widget,
GdkDrawable *drawable,
- /* Location of the layout
- in buffer coordinates */
+ /* Location of the drawable
+ in layout coordinates */
gint x_offset,
gint y_offset,
/* Region of the layout to
@@ -782,9 +782,9 @@ gtk_text_layout_draw (GtkTextLayout *layout,
gc = widget->style->fg_gc[GTK_STATE_NORMAL];
gdk_draw_line (drawable, gc,
- line_display->x_offset + cursor->x,
+ line_display->x_offset + cursor->x - x_offset,
current_y + line_display->top_margin + cursor->y,
- line_display->x_offset + cursor->x,
+ line_display->x_offset + cursor->x - x_offset,
current_y + line_display->top_margin + cursor->y + cursor->height - 1);
cursor_list = cursor_list->next;