diff options
author | Havoc Pennington <hp@pobox.com> | 2000-12-31 23:28:57 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-12-31 23:28:57 +0000 |
commit | 7a958797e2287d4d51042f392d0cc6fd5bbf393a (patch) | |
tree | 32ca11fae9284f12644dbf344f6dbf13970ab2a8 /gtk/gtktextiter.h | |
parent | 72cdcb63237098aee02e6fe33804832b2bb1379c (diff) | |
download | gdk-pixbuf-7a958797e2287d4d51042f392d0cc6fd5bbf393a.tar.gz |
Rearrange all the scroll-while-dragging-or-selecting code to be different,
2000-12-31 Havoc Pennington <hp@pobox.com>
* gtk/gtktextview.c: Rearrange all the
scroll-while-dragging-or-selecting code to be different, not
necessarily better. ;-)
(gtk_text_view_scroll_to_mark): Change this
function to take within_margin as a fraction instead of a pixel
value, and to take alignment arguments (indicating where to align
the mark inside the visible area)
* gtk/testtextbuffer.c (fill_buffer): fix bad cast of GtkTextTag
to GtkObject
* gtk/gtktextiter.c (gtk_text_iter_set_line_offset): change
behavior so that offsets past the end of the line are not
allowed, and an offset equal to the line length moves the iterator
to the next line
(gtk_text_iter_set_line_index): make parallel change
(gtk_text_iter_get_bytes_in_line): add this function
* gtk/gtktextbtree.c (_gtk_text_line_byte_locate): change handling
of byte indexes off the end of the line; byte index at the end of
the line now returns FALSE and doesn't fill in the requested
values, byte index past the end of the line is an error. Also,
don't allow -1 offset anymore, since its meaning is unclear.
This change exposes some bug in visual cursor motion, where we
end up with a huge invalid byte index; needs fixing. Symptom of
bug is a crash when you hit up arrow.
(_gtk_text_line_char_locate): match the change to byte_locate
* gtk/gtktextiter.c (find_by_log_attrs): Handle iteration backward
from start of line properly. fixes bug reported by Mikael
Hermansson where backspace would delete all text before the
cursor.
Diffstat (limited to 'gtk/gtktextiter.h')
-rw-r--r-- | gtk/gtktextiter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/gtktextiter.h b/gtk/gtktextiter.h index 0f46d625a..17bd586b9 100644 --- a/gtk/gtktextiter.h +++ b/gtk/gtktextiter.h @@ -133,6 +133,7 @@ gboolean gtk_text_iter_ends_line (const GtkTextIter *iter); gboolean gtk_text_iter_is_cursor_position (const GtkTextIter *iter); gint gtk_text_iter_get_chars_in_line (const GtkTextIter *iter); +gint gtk_text_iter_get_bytes_in_line (const GtkTextIter *iter); gboolean gtk_text_iter_get_attributes (const GtkTextIter *iter, GtkTextAttributes *values); |