[gtksourceview] gutterrendererlines: bold when highlight-current-line is set



commit 0ea6871b14fe8f3cda5d0b853c0263bd8e4de33b
Author: Christian Hergert <chergert redhat com>
Date:   Wed Dec 1 13:04:59 2021 -0800

    gutterrendererlines: bold when highlight-current-line is set
    
    Even if the cursor is not visible, we still want the line number bold
    because the background could be drawn.

 gtksourceview/gtksourcegutterrendererlines.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourcegutterrendererlines.c b/gtksourceview/gtksourcegutterrendererlines.c
index c78a101f..4a6798be 100644
--- a/gtksourceview/gtksourcegutterrendererlines.c
+++ b/gtksourceview/gtksourcegutterrendererlines.c
@@ -380,7 +380,7 @@ gtk_source_gutter_renderer_lines_query_data (GtkSourceGutterRenderer *renderer,
        GtkSourceGutterRendererLines *self = GTK_SOURCE_GUTTER_RENDERER_LINES (renderer);
        gint len;
 
-       if G_UNLIKELY (self->cursor_visible && gtk_source_gutter_lines_is_cursor (lines, line))
+       if G_UNLIKELY ((self->cursor_visible || self->highlight_current_line) && 
gtk_source_gutter_lines_is_cursor (lines, line))
        {
                gchar text[32];
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]