diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-02-26 20:10:52 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-02-26 20:10:52 +0000 |
commit | 87ab3ced3a3ff4b8fb92a537b2605399e43c6083 (patch) | |
tree | b90729587f1a3db2dfaccddcaff0fdad3502817d /gtk | |
parent | a2cd674983e61dfd96980d532300bc2793096ce2 (diff) | |
download | gtk+-87ab3ced3a3ff4b8fb92a537b2605399e43c6083.tar.gz |
use the cursor position _after_ deleting the text as the position to
Tue Feb 26 15:04:33 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_enter_text): use
the cursor position _after_ deleting the text
as the position to insert at. (#72717, Jan Mynarik)
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkentry.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 3a4dcfbaa9..663b8a4026 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -2280,7 +2280,7 @@ gtk_entry_enter_text (GtkEntry *entry, const gchar *str) { GtkEditable *editable = GTK_EDITABLE (entry); - gint tmp_pos = entry->current_pos; + gint tmp_pos; if (gtk_editable_get_selection_bounds (editable, NULL, NULL)) gtk_editable_delete_selection (editable); @@ -2290,6 +2290,7 @@ gtk_entry_enter_text (GtkEntry *entry, gtk_entry_delete_from_cursor (entry, GTK_DELETE_CHARS, 1); } + tmp_pos = entry->current_pos; gtk_editable_insert_text (editable, str, strlen (str), &tmp_pos); gtk_editable_set_position (editable, tmp_pos); } |