Commit a433d5c5 authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

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
parent 419f3e9b
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
......
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
......
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
......
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
......
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
......
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
......
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
......
......@@ -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;
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment