Commit 458d71a9 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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)
parent dd19f542
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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);
}
......
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