textview: Don't eat block cursors
authorMatthias Clasen <mclasen@redhat.com>
Fri, 20 Aug 2021 05:55:50 +0000 (01:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 20 Aug 2021 05:57:31 +0000 (01:57 -0400)
We need to render even an empty paragraph when
it has a block cursor at the end. This fixes block
cursors not showing up in empty lines.

gtk/gtktextlayout.c

index ea5e85a5772c99ae41602b7e8f1c327c405d952d..80fb0a2bf1292f7fd0a5e12657ad8e33bc02b103 100644 (file)
@@ -4213,7 +4213,8 @@ gtk_text_layout_snapshot (GtkTextLayout      *layout,
 
           if (line_display->node == NULL &&
               (pango_layout_get_character_count (line_display->layout) > 0 ||
-               selection_start_index != -1 || selection_end_index != -1))
+               selection_start_index != -1 || selection_end_index != -1 ||
+               line_display->has_block_cursor))
             {
               gtk_snapshot_push_collect (snapshot);
               render_para (crenderer, line_display,