From a98a2b9936c594bff30cdf67bcc87b17d2a59378 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 3 Feb 2001 16:47:48 +0000 Subject: [PATCH] Fix bug reported by Mikael Hermansson with patch from Mikael (if there was 2001-02-03 Havoc Pennington * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by Mikael Hermansson with patch from Mikael (if there was a toggle start one after the first character in the range, this function was broken). Bug #50380 --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtktextbtree.c | 7 +++++-- 8 files changed, 54 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 734d9f3706..e50a038055 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 734d9f3706..e50a038055 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 734d9f3706..e50a038055 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 734d9f3706..e50a038055 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 734d9f3706..e50a038055 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 734d9f3706..e50a038055 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 734d9f3706..e50a038055 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2001-02-03 Havoc Pennington + + * gtk/gtktextbtree.c (_gtk_text_btree_tag): Fix bug reported by + Mikael Hermansson with patch from Mikael (if there was a toggle + start one after the first character in the range, this function + was broken). Bug #50380 + Sat Feb 3 11:28:03 2001 Owen Taylor * configure.in: Remove confusing comment about X11. diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index db30bd9b5c..d6bd9bca99 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -1606,8 +1606,11 @@ _gtk_text_btree_tag (const GtkTextIter *start_orig, with the tree. */ stack = iter_stack_new (); iter = start; - /* We don't want to delete a toggle that's at the start iterator. */ - gtk_text_iter_forward_char (&iter); + + /* forward_to_tag_toggle() skips a toggle at the start iterator, + * which is deliberate - we don't want to delete a toggle at the + * start. + */ while (gtk_text_iter_forward_to_tag_toggle (&iter, tag)) { if (gtk_text_iter_compare (&iter, &end) >= 0)