forked from AuroraMiddleware/gtk
Fixed broken list-removal code.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtktext.c (remove_cache_line): Fixed broken list-removal code. * gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr) Check bounds before deleting.
This commit is contained in:
parent
0895f5b669
commit
dbcf64a3f2
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* gtk/gtktext.c (remove_cache_line): Fixed broken
|
||||
list-removal code.
|
||||
|
||||
* gtk/gtktext.c: (gtk_text_delete_(forward/backward)_cahr)
|
||||
Check bounds before deleting.
|
||||
|
||||
Wed Jun 10 23:21:33 1998 Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
* autogen.sh: Support ACLOCAL_FLAGS
|
||||
|
@ -1625,7 +1625,11 @@ gtk_text_delete_text (GtkEditable *editable,
|
||||
gint start_pos,
|
||||
gint end_pos)
|
||||
{
|
||||
GtkText *text = GTK_TEXT (editable);
|
||||
GtkText *text;
|
||||
|
||||
g_return_if_fail (start_pos >= 0);
|
||||
|
||||
text = GTK_TEXT (editable);
|
||||
|
||||
gtk_text_set_point (text, start_pos);
|
||||
if (end_pos < 0)
|
||||
@ -3262,20 +3266,17 @@ remove_cache_line (GtkText* text, GList* member)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
if (member == NULL)
|
||||
return NULL;
|
||||
|
||||
if (member == text->line_start_cache)
|
||||
{
|
||||
if (text->line_start_cache)
|
||||
text->line_start_cache = text->line_start_cache->next;
|
||||
}
|
||||
|
||||
if (member->prev)
|
||||
{
|
||||
list = member->prev;
|
||||
member->prev->next = member->next;
|
||||
|
||||
list->next = member->next;
|
||||
if (list->next)
|
||||
list->next->prev = list;
|
||||
}
|
||||
if (member->next)
|
||||
member->next->prev = member->prev;
|
||||
|
||||
list = member->next;
|
||||
|
||||
@ -3497,6 +3498,7 @@ gtk_text_delete_forward_character (GtkText *text)
|
||||
gtk_editable_delete_selection (editable);
|
||||
else
|
||||
{
|
||||
if (text->point.index + 1 <= TEXT_LENGTH (text))
|
||||
gtk_editable_delete_text (editable, text->point.index, text->point.index + 1);
|
||||
}
|
||||
}
|
||||
@ -3511,6 +3513,7 @@ gtk_text_delete_backward_character (GtkText *text)
|
||||
gtk_editable_delete_selection (editable);
|
||||
else
|
||||
{
|
||||
if (text->point.index > 0)
|
||||
gtk_editable_delete_text (editable, text->point.index - 1, text->point.index);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user