Explorar o código

Make DECSCUSR thickness configurable

Omar Sandoval %!s(int64=10) %!d(string=hai) anos
pai
achega
ecac5ee35e
Modificáronse 2 ficheiros con 10 adicións e 5 borrados
  1. 5 0
      config.def.h
  2. 5 5
      st.c

+ 5 - 0
config.def.h

@@ -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

+ 5 - 5
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 {