When redrawing the under-cursor character, don't redraw the terminating

Tue Jan  5 11:51:32 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
	When redrawing the under-cursor character, don't
	redraw the terminating NULL.
	[ From: dov@imagic.weizmann.ac.il (Dov Grobgeld) ]
This commit is contained in:
Owen Taylor
1999-01-05 23:46:49 +00:00
committed by Owen Taylor
parent 1fd7a6e491
commit 5126b13c0a
9 changed files with 358 additions and 15 deletions

View File

@ -1454,12 +1454,14 @@ gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable)
NULL, widget, "entry_bg",
xoffset, INNER_BORDER,
1, text_area_height - INNER_BORDER);
/* Draw the character under the cursor again */
gdk_draw_text_wc (drawable, widget->style->font,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
xoffset, yoffset,
entry->text + editable->current_pos, 1);
/* Draw the character under the cursor again
*/
if (editable->current_pos < entry->text_length)
gdk_draw_text_wc (drawable, widget->style->font,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
xoffset, yoffset,
entry->text + editable->current_pos, 1);
}