textview: fix assertion when toggling caret visibility

When toggling caret visibility (with F7) we would hit an assertion if the
cursor is currently blinking. This adjusts things to ensure that we should
be showing the carent when scheduling our blink timeouts.

Fixes #2647
This commit is contained in:
Christian Hergert 2020-04-21 13:39:50 -07:00
parent c09b5ea7b4
commit 55dd737ea0

View File

@ -6048,7 +6048,7 @@ gtk_text_view_check_cursor_blink (GtkTextView *text_view)
{
GtkTextViewPrivate *priv = text_view->priv;
if (cursor_blinks (text_view))
if (cursor_blinks (text_view) && cursor_visible (text_view))
{
if (!priv->blink_tick)
add_blink_timeout (text_view, FALSE);