diff --git a/ChangeLog b/ChangeLog index 5182431543..0cda76c973 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5182431543..0cda76c973 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5182431543..0cda76c973 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5182431543..0cda76c973 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5182431543..0cda76c973 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5182431543..0cda76c973 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5182431543..0cda76c973 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2002-01-17 Havoc Pennington + + * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change + GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it + starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work + as in the keynav spec, though it makes the interpretation of + GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some + of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes + any sense anyhow. + Thu Jan 17 16:34:55 2002 Jonathan Blandford * gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 7f3f79e3b1..10cb65d1e5 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4457,8 +4457,28 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view, break; case GTK_MOVEMENT_PARAGRAPHS: - gtk_text_iter_forward_lines (&newplace, count); - gtk_text_iter_set_line_offset (&newplace, 0); + if (count > 0) + { + if (!gtk_text_iter_ends_line (&newplace)) + { + gtk_text_iter_forward_to_line_end (&newplace); + --count; + } + } + else if (count < 0) + { + if (gtk_text_iter_get_line_offset (&newplace) > 0) + { + gtk_text_iter_set_line_offset (&newplace, 0); + ++count; + } + } + + if (count != 0) + { + gtk_text_iter_forward_lines (&newplace, count); + gtk_text_iter_set_line_offset (&newplace, 0); + } break; case GTK_MOVEMENT_PARAGRAPH_ENDS: