diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2003-01-14 01:07:58 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-01-14 01:07:58 +0000 |
commit | 740f871a15b5bf0282bd6bbf1f4fc3423d04ce1b (patch) | |
tree | 15efbf79c7756cc1a3b51f1840935c055a8e3055 /gtk/gtktextview.c | |
parent | 53d79aa119769c5174a57cd68548c665acac0ea8 (diff) | |
download | gdk-pixbuf-740f871a15b5bf0282bd6bbf1f4fc3423d04ce1b.tar.gz |
Skip invisible chars for GTK_MOVEMENT_LOGICAL_POSITIONS and
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Skip
invisible chars for GTK_MOVEMENT_LOGICAL_POSITIONS and
GTK_MOVEMENT_WORDS.
* gtk/gtktextiter.c,
gtk/gtktextiter.h: Add some variant movement functions which
skip invisible chars, and do some cleanups.
* gtk/gtk-sections.txt: Add new GtkTextIter functions.
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index e7b3c11fc..352309ee7 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4524,7 +4524,7 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view, switch (step) { case GTK_MOVEMENT_LOGICAL_POSITIONS: - gtk_text_iter_forward_cursor_positions (&newplace, count); + gtk_text_iter_forward_visible_cursor_positions (&newplace, count); break; case GTK_MOVEMENT_VISUAL_POSITIONS: @@ -4534,9 +4534,9 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view, case GTK_MOVEMENT_WORDS: if (count < 0) - gtk_text_iter_backward_word_starts (&newplace, -count); + gtk_text_iter_backward_visible_word_starts (&newplace, -count); else if (count > 0) - gtk_text_iter_forward_word_ends (&newplace, count); + gtk_text_iter_forward_visible_word_ends (&newplace, count); break; case GTK_MOVEMENT_DISPLAY_LINES: @@ -5162,10 +5162,10 @@ extend_selection (GtkTextView *text_view, if (gtk_text_iter_inside_word (start)) { if (!gtk_text_iter_starts_word (start)) - gtk_text_iter_backward_word_start (start); + gtk_text_iter_backward_visible_word_start (start); if (!gtk_text_iter_ends_word (end)) - gtk_text_iter_forward_word_end (end); + gtk_text_iter_forward_visible_word_end (end); } else extend = FALSE; |