From 2cabfbf0e5babd17171251ca89cd3abfd7a319b4 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 30 Nov 2000 16:23:54 +0000 Subject: [PATCH] Fix stupid bug causing extra word movement backwards. (#15282, Marco Thu Nov 30 11:19:56 2000 Owen Taylor * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid bug causing extra word movement backwards. (#15282, Marco Goetze) --- ChangeLog | 15 ++++++++++++++- ChangeLog.pre-2-0 | 15 ++++++++++++++- ChangeLog.pre-2-10 | 15 ++++++++++++++- ChangeLog.pre-2-2 | 15 ++++++++++++++- ChangeLog.pre-2-4 | 15 ++++++++++++++- ChangeLog.pre-2-6 | 15 ++++++++++++++- ChangeLog.pre-2-8 | 15 ++++++++++++++- gtk/gtkentry.c | 14 ++++++++++---- 8 files changed, 108 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 3e63892570..92b0d6cc11 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +Thu Nov 30 11:19:56 2000 Owen Taylor + + * gtk/gtkentry.c (gtk_entry_move_word): Fix stupid + bug causing extra word movement backwards. (#15282, Marco Goetze) + +Wed Nov 29 21:47:26 2000 Owen Taylor + + [ Backport from 1.3.x ] + + * gtk/gtktoolbar.c (gtk_toolbar_prepend_widget): Fix to + prepend not append. (Pointed out by Brett Hall.) + #11887. + Wed Nov 29 20:56:38 2000 Owen Taylor * gtk/gtkwidget.[ch] (gtk_widget_is_ancestor): Change @@ -533,7 +546,7 @@ Wed Jan 26 19:01:56 2000 Owen Taylor - completion on files in home directory didn't work - completion on an empty string caused segfault - (Bug #3768, reported by Steve Ratcliffe) + (Bug #3678, reported by Steve Ratcliffe) * gtk/gtkscale.c (gtk_scale_get_value_width): Fix cut and paste error that was causing scales to diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 6cc62ad2e5..25e9cef7c9 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1957,10 +1957,16 @@ static void gtk_entry_move_word (GtkEditable *editable, gint n) { - while (n-- > 0) - gtk_move_forward_word (GTK_ENTRY (editable)); - while (n++ < 0) - gtk_move_backward_word (GTK_ENTRY (editable)); + while (n > 0) + { + gtk_move_forward_word (GTK_ENTRY (editable)); + n--; + } + while (n < 0) + { + gtk_move_backward_word (GTK_ENTRY (editable)); + n++; + } } static void