URI:
       tRespect theme for cursor and text selection - ledit - Text editor (WIP)
  HTML git clone git://lumidify.org/ledit.git (fast, but not encrypted)
  HTML git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 2e64aac7eba6791ed47514d37838b0d5d9d00cf1
   DIR parent bc282da2c2bfd820f810d1e03bc829fe3928f3e5
  HTML Author: lumidify <nobody@lumidify.org>
       Date:   Sun, 24 Oct 2021 14:04:14 +0200
       
       Respect theme for cursor and text selection
       
       Diffstat:
         M Makefile                            |       2 ++
         M buffer.c                            |      14 +++++++++-----
       
       2 files changed, 11 insertions(+), 5 deletions(-)
       ---
   DIR diff --git a/Makefile b/Makefile
       t@@ -48,6 +48,8 @@ LDFLAGS_LEDIT = ${LDFLAGS} `pkg-config --libs x11 xkbfile pangoxft xext` -lm
        
        all: ${BIN}
        
       +# FIXME: separate *_config.h so they don't make everything recompile
       +
        ${OBJ} : ${HDR}
        
        .c.o:
   DIR diff --git a/buffer.c b/buffer.c
       t@@ -214,9 +214,11 @@ ledit_buffer_set_line_selection(ledit_buffer *buffer, int line, int start_byte, 
                ledit_line *l = ledit_buffer_get_line(buffer, line);
                if (l->text_dirty)
                        err_text_dirty(buffer, line);
       -        /* FIXME: configure color */
       -        PangoAttribute *attr0 = pango_attr_background_new(0, 0, 0);
       -        PangoAttribute *attr1 = pango_attr_foreground_new(65535, 65535, 65535);
       +        /* FIXME: Are these guaranteed to be range 0-65535? */
       +        XRenderColor fg = buffer->theme->text_fg.color;
       +        XRenderColor bg = buffer->theme->text_bg.color;
       +        PangoAttribute *attr0 = pango_attr_background_new(fg.red, fg.green, fg.blue);
       +        PangoAttribute *attr1 = pango_attr_foreground_new(bg.red, bg.green, bg.blue);
                attr0->start_index = start_byte;
                attr0->end_index = end_byte;
                attr1->start_index = start_byte;
       t@@ -238,8 +240,10 @@ ledit_buffer_set_line_cursor_attrs(ledit_buffer *buffer, int line, int index) {
                if (l->text_dirty)
                        err_text_dirty(buffer, line);
                if (buffer->common->mode == NORMAL) {
       -                PangoAttribute *attr0 = pango_attr_background_new(0, 0, 0);
       -                PangoAttribute *attr1 = pango_attr_foreground_new(65535, 65535, 65535);
       +                XRenderColor fg = buffer->theme->text_fg.color;
       +                XRenderColor bg = buffer->theme->text_bg.color;
       +                PangoAttribute *attr0 = pango_attr_background_new(fg.red, fg.green, fg.blue);
       +                PangoAttribute *attr1 = pango_attr_foreground_new(bg.red, bg.green, bg.blue);
                        attr0->start_index = index;
                        attr0->end_index = index + 1;
                        attr1->start_index = index;