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:40:17 +00:00
committed by Matthias Clasen
parent 8fe7ec4ede
commit 504ee67c2e
4 changed files with 9 additions and 6 deletions

View File

@@ -2,6 +2,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

@@ -2,6 +2,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

@@ -2,6 +2,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

@@ -4754,17 +4754,14 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view,
--count;
}
gtk_text_iter_forward_lines (&newplace, count);
gtk_text_iter_forward_to_line_end (&newplace);
gtk_text_iter_forward_to_line_end (&newplace);
}
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_lines (&newplace, count);
gtk_text_iter_set_line_offset (&newplace, 0);
gtk_text_iter_set_line_offset (&newplace, 0);
}
break;