tMake DECSCUSR thickness configurable - st - [fork] customized build of st, the… | |
git clone git://src.adamsgaard.dk/st | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit ecac5ee35ef006001b280461ed3f9812d855250c | |
parent 93b54cfcc437c9bac9af3ceb2d9ba19c442de1ff | |
Author: Omar Sandoval <[email protected]> | |
Date: Thu, 9 Apr 2015 18:22:31 -0700 | |
Make DECSCUSR thickness configurable | |
Diffstat: | |
M config.def.h | 5 +++++ | |
M st.c | 10 +++++----- | |
2 files changed, 10 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/config.def.h b/config.def.h | |
t@@ -42,6 +42,11 @@ static unsigned int actionfps = 30; | |
static unsigned int blinktimeout = 800; | |
/* | |
+ * thickness of underline and bar cursors | |
+ */ | |
+static unsigned int cursorthickness = 2; | |
+ | |
+/* | |
* bell volume. It must be a value between -100 and 100. Use 0 for disabling | |
* it | |
*/ | |
diff --git a/st.c b/st.c | |
t@@ -3591,15 +3591,15 @@ xdrawcursor(void) { | |
case 4: /* Steady Underline */ | |
XftDrawRect(xw.draw, &dc.col[defaultcs], | |
borderpx + curx * xw.cw, | |
- borderpx + (term.c.y + 1) * xw… | |
- xw.cw, 1); | |
+ borderpx + (term.c.y + 1) * xw… | |
+ xw.cw, cursorthickness); | |
break; | |
case 5: /* Blinking bar */ | |
case 6: /* Steady bar */ | |
XftDrawRect(xw.draw, &dc.col[defaultcs], | |
- borderpx + cur… | |
- borderpx + ter… | |
- 1, xw.ch); | |
+ borderpx + curx * xw.cw, | |
+ borderpx + term.c.y * xw.ch, | |
+ cursorthickness, xw.ch); | |
break; | |
} | |
} else { |