diff options
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r-- | gtk/gtktextbtree.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c index 5b1f98430b..59c00824e9 100644 --- a/gtk/gtktextbtree.c +++ b/gtk/gtktextbtree.c @@ -394,9 +394,11 @@ gtk_text_btree_new (GtkTextTagTable *table, tree->views = NULL; /* Set these to values that are unlikely to be found - in random memory garbage. */ - tree->chars_changed_stamp = 49; - tree->segments_changed_stamp = 243; + * in random memory garbage, and also avoid + * duplicates between tree instances. + */ + tree->chars_changed_stamp = g_random_int (); + tree->segments_changed_stamp = g_random_int (); tree->end_iter_line_stamp = tree->chars_changed_stamp - 1; tree->end_iter_line = NULL; |