summaryrefslogtreecommitdiff
path: root/gtk/gtktextbtree.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2000-12-31 23:28:57 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-12-31 23:28:57 +0000
commit7a958797e2287d4d51042f392d0cc6fd5bbf393a (patch)
tree32ca11fae9284f12644dbf344f6dbf13970ab2a8 /gtk/gtktextbtree.h
parent72cdcb63237098aee02e6fe33804832b2bb1379c (diff)
downloadgtk+-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/gtktextbtree.h')
-rw-r--r--gtk/gtktextbtree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtktextbtree.h b/gtk/gtktextbtree.h
index 93558fae5c..65932b3dc0 100644
--- a/gtk/gtktextbtree.h
+++ b/gtk/gtktextbtree.h
@@ -225,13 +225,13 @@ GtkTextLineSegment *_gtk_text_line_byte_to_segment (GtkTextLine
GtkTextLineSegment *_gtk_text_line_char_to_segment (GtkTextLine *line,
gint char_offset,
gint *seg_offset);
-void _gtk_text_line_byte_locate (GtkTextLine *line,
+gboolean _gtk_text_line_byte_locate (GtkTextLine *line,
gint byte_offset,
GtkTextLineSegment **segment,
GtkTextLineSegment **any_segment,
gint *seg_byte_offset,
gint *line_byte_offset);
-void _gtk_text_line_char_locate (GtkTextLine *line,
+gboolean _gtk_text_line_char_locate (GtkTextLine *line,
gint char_offset,
GtkTextLineSegment **segment,
GtkTextLineSegment **any_segment,