summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-11-14 19:05:21 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-11-14 19:05:21 +0000
commita433d5c5c1da3b763236f4183501e018e5f59e79 (patch)
tree2bbf04102d28d4d227675f298b12954a947b8d7d
parent419f3e9bcc0f27b49dfd2e59328f10dc198a421d (diff)
downloadgdk-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--ChangeLog8
-rw-r--r--ChangeLog.pre-2-08
-rw-r--r--ChangeLog.pre-2-108
-rw-r--r--ChangeLog.pre-2-28
-rw-r--r--ChangeLog.pre-2-48
-rw-r--r--ChangeLog.pre-2-68
-rw-r--r--ChangeLog.pre-2-88
-rw-r--r--gtk/gtktextiter.c4
-rw-r--r--gtk/gtktextview.c9
9 files changed, 65 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 25fc94d54..82a7066bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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: