diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-05-23 08:28:00 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-05-23 08:28:00 -0400 |
commit | b3e65bfdc10fa9ac1a5763084106f7eda520876f (patch) | |
tree | daaf9183f623f5283a8e4485cc4eed3496e2241a | |
parent | 0f01629ce30404b402399a7dd0616147f4c5e3a2 (diff) | |
download | gtk+-b3e65bfdc10fa9ac1a5763084106f7eda520876f.tar.gz |
Remove an assertion that we hit
It appears that we mess up accounting for blinking
cursors sometimes, and can hit blink_cb when there
is a nonempty selection.
Instead of asserting, warn and stop blinking.
Related: #4767
-rw-r--r-- | gtk/gtktext.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtktext.c b/gtk/gtktext.c index 6bbb6b3098..92903949fe 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -6535,7 +6535,13 @@ blink_cb (GtkWidget *widget, return G_SOURCE_REMOVE; } - g_assert (priv->selection_bound == priv->current_pos); + if (priv->selection_bound != priv->current_pos) + { + g_warning ("GtkText - unexpected blinking selection. Removing"); + + gtk_text_check_cursor_blink (self); + return G_SOURCE_REMOVE; + } blink_timeout = get_cursor_blink_timeout (self); blink_time = get_cursor_time (self); |