From d6dbac4f04e1ab8c6e7a2ad13452f63e338877ef Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 4 Nov 2020 17:31:08 +0100 Subject: Removed selectioncolors patch for some TUI programs do not like it --- README | 1 - README.org | 1 - config.h | 18 ++++++------------ x.c | 7 +++---- 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/README b/README index 6e100f4..4892ab4 100644 --- a/README +++ b/README @@ -36,7 +36,6 @@ Here is my list: - hidecursor - keyboard select - scrollback - - selectioncolors Settings -------- diff --git a/README.org b/README.org index 2429ba5..d2319c2 100644 --- a/README.org +++ b/README.org @@ -33,7 +33,6 @@ Here is my list: - /hidecursor/ - /keyboard select/ - /scrollback/ -- /selectioncolors/ * Settings Most settings are done by editing ~config.h~ and recompiling. diff --git a/config.h b/config.h index 1e00d45..c99b52f 100644 --- a/config.h +++ b/config.h @@ -37,7 +37,7 @@ char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; char *vtiden = "\033[?6c"; /* Kerning / character bounding-box multipliers */ -float cwscale = 0.8; +float cwscale = 0.85; float chscale = 1.0; /* @@ -131,10 +131,9 @@ const char *colorname[] = { [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ - "#1d2021", /* 256: bg */ - "#ebdbb2", /* 257: fg */ + "#ebdbb2", /* 256: fg */ + "#1d2021", /* 257: bg */ "#d79921", /* 258: cursor */ - "#32302f", /* 259: selection color */ }; @@ -142,15 +141,10 @@ const char *colorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -unsigned int defaultfg = 257; -unsigned int defaultbg = 256; +unsigned int defaultfg = 256; +unsigned int defaultbg = 257; unsigned int defaultcs = 258; -unsigned int defaultrcs = 258; -unsigned int selectionbg = 259; -unsigned int selectionfg = 257; -/* If 0 use selectionfg as foreground in order to have a uniform foreground-color */ -/* Else if 1 keep original foreground-color of each cell => more colors :) */ -int ignoreselfg = 1; +unsigned int defaultrcs = 257; /* * Default shape of cursor diff --git a/x.c b/x.c index e0fbc10..86b2224 100644 --- a/x.c +++ b/x.c @@ -1259,7 +1259,6 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i XRenderColor colfg, colbg; XRectangle r; - (void)temp; /* Fallback on color display for attributes not supported by the font */ if (base.mode & ATTR_ITALIC && base.mode & ATTR_BOLD) { if (dc.ibfont.badslant || dc.ibfont.badweight) @@ -1327,9 +1326,9 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i } if (base.mode & ATTR_REVERSE) { - bg = &dc.col[selectionbg]; - if (!ignoreselfg) - fg = &dc.col[selectionfg]; + temp = fg; + fg = bg; + bg = temp; } if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK) -- cgit v1.2.3