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
This commit is contained in:
Havoc Pennington 2001-11-14 19:05:21 +00:00 committed by Havoc Pennington
parent 419f3e9bcc
commit a433d5c5c1
9 changed files with 65 additions and 4 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -1,3 +1,11 @@
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

View File

@ -1,3 +1,11 @@
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

View File

@ -1,3 +1,11 @@
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

View File

@ -1,3 +1,11 @@
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

View File

@ -1,3 +1,11 @@
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

View File

@ -1,3 +1,11 @@
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

View File

@ -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;

View File

@ -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: