diff options
author | Havoc Pennington <hp@redhat.com> | 2001-11-14 19:05:21 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-11-14 19:05:21 +0000 |
commit | a433d5c5c1da3b763236f4183501e018e5f59e79 (patch) | |
tree | 2bbf04102d28d4d227675f298b12954a947b8d7d | |
parent | 419f3e9bcc0f27b49dfd2e59328f10dc198a421d (diff) | |
download | gdk-pixbuf-a433d5c5c1da3b763236f4183501e018e5f59e79.tar.gz |
fix Control-E so it doesn't move to a new line each time you press it
2001-11-14 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so
it doesn't move to a new line each time you press it
* gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix
return value, #62987
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 8 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 8 | ||||
-rw-r--r-- | gtk/gtktextiter.c | 4 | ||||
-rw-r--r-- | gtk/gtktextview.c | 9 |
9 files changed, 65 insertions, 4 deletions
@@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 25fc94d54..82a7066bb 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 25fc94d54..82a7066bb 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 25fc94d54..82a7066bb 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 25fc94d54..82a7066bb 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 25fc94d54..82a7066bb 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 25fc94d54..82a7066bb 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,13 @@ 2001-11-14 Havoc Pennington <hp@redhat.com> + * gtk/gtktextview.c (gtk_text_view_move_cursor): fix Control-E so + it doesn't move to a new line each time you press it + + * gtk/gtktextiter.c (gtk_text_iter_forward_to_line_end): fix + return value, #62987 + +2001-11-14 Havoc Pennington <hp@redhat.com> + * tests/testtextbuffer.c (main): bulk of the tests were commented out, oops. diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index 041ec2309..5a00c1760 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -3816,7 +3816,7 @@ gtk_text_iter_forward_to_line_end (GtkTextIter *iter) { /* Move to end of this line. */ gtk_text_iter_set_line_offset (iter, new_offset); - return TRUE; + return !gtk_text_iter_is_end (iter); } else { @@ -3828,7 +3828,7 @@ gtk_text_iter_forward_to_line_end (GtkTextIter *iter) */ if (!gtk_text_iter_ends_line (iter)) gtk_text_iter_forward_to_line_end (iter); - return TRUE; + return !gtk_text_iter_is_end (iter); } else return FALSE; diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 5427d8fbb..8017a94cf 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4116,9 +4116,14 @@ gtk_text_view_move_cursor (GtkTextView *text_view, case GTK_MOVEMENT_PARAGRAPH_ENDS: if (count > 0) - gtk_text_iter_forward_to_line_end (&newplace); + { + if (!gtk_text_iter_ends_line (&newplace)) + gtk_text_iter_forward_to_line_end (&newplace); + } else if (count < 0) - gtk_text_iter_set_line_offset (&newplace, 0); + { + gtk_text_iter_set_line_offset (&newplace, 0); + } break; case GTK_MOVEMENT_BUFFER_ENDS: |