Make movement by paragraphs up/down symmetric. (#307055, Behnam Esfahbod)

2005-06-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c
	(gtk_text_view_move_cursor_internal): Make movement by
	paragraphs up/down symmetric.  (#307055, Behnam Esfahbod)
This commit is contained in:
Matthias Clasen 2005-06-24 17:42:17 +00:00 committed by Matthias Clasen
parent dd19f542db
commit 458d71a96a
4 changed files with 7 additions and 6 deletions

View File

@ -9,6 +9,8 @@
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
jump to the next line if we are at the end of the line.
(gtk_text_view_move_cursor_internal): Make movement by
paragraphs up/down symmetric. (#307055, Behnam Esfahbod)
2005-06-23 Tor Lillqvist <tml@novell.com>

View File

@ -9,6 +9,8 @@
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
jump to the next line if we are at the end of the line.
(gtk_text_view_move_cursor_internal): Make movement by
paragraphs up/down symmetric. (#307055, Behnam Esfahbod)
2005-06-23 Tor Lillqvist <tml@novell.com>

View File

@ -9,6 +9,8 @@
* gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
jump to the next line if we are at the end of the line.
(gtk_text_view_move_cursor_internal): Make movement by
paragraphs up/down symmetric. (#307055, Behnam Esfahbod)
2005-06-23 Tor Lillqvist <tml@novell.com>

View File

@ -4752,8 +4752,6 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view,
break;
case GTK_MOVEMENT_PARAGRAPHS:
g_print ("move paragraphs: %d %d\n",
count, gtk_text_iter_get_line_offset (&newplace));
if (count > 0)
{
if (!gtk_text_iter_ends_line (&newplace))
@ -4767,10 +4765,7 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view,
else if (count < 0)
{
if (gtk_text_iter_get_line_offset (&newplace) > 0)
{
gtk_text_iter_set_line_offset (&newplace, 0);
++count;
}
gtk_text_iter_set_line_offset (&newplace, 0);
gtk_text_iter_forward_visible_lines (&newplace, count);
gtk_text_iter_set_line_offset (&newplace, 0);
}