Make DECSCUSR thickness configurable
authorOmar Sandoval <osandov@osandov.com>
Fri, 10 Apr 2015 01:22:31 +0000 (18:22 -0700)
committerRoberto E. Vargas Caballero <k0ga@shike2.com>
Fri, 10 Apr 2015 21:43:05 +0000 (23:43 +0200)
config.def.h
st.c

index 56bae2d..5e7caaf 100644 (file)
@@ -41,6 +41,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
index a7064b1..b2bcfe9 100644 (file)
--- a/st.c
+++ b/st.c
@@ -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.ch - 1,
-                                               xw.cw, 1);
+                                               borderpx + (term.c.y + 1) * xw.ch - cursorthickness,
+                                               xw.cw, cursorthickness);
                                break;
                        case 5: /* Blinking bar */
                        case 6: /* Steady bar */
                                XftDrawRect(xw.draw, &dc.col[defaultcs],
-                                                               borderpx + curx * xw.cw,
-                                                               borderpx + term.c.y * xw.ch,
-                                                               1, xw.ch);
+                                               borderpx + curx * xw.cw,
+                                               borderpx + term.c.y * xw.ch,
+                                               cursorthickness, xw.ch);
                                break;
                }
        } else {