[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#299439: xterm: Request for underline cursor.



Package: xterm
Version: 4.3.0.dfsg.1-10
Severity: wishlist
Tags: patch


I'd like an option for xterm to use a underline cursor instead of the
block.

The attached patch is included as proof-of-concept and is not intended
for actual use.

-Mar.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.11
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages xterm depends on:
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libexpat1                1.95.8-1        XML parsing C library - runtime li
ii  libfontconfig1           2.2.3-4         generic font configuration library
ii  libfreetype6             2.1.7-2.3       FreeType 2 font engine, shared lib
ii  libice6                  4.3.0.dfsg.1-10 Inter-Client Exchange library
ii  libncurses5              5.4-4           Shared libraries for terminal hand
ii  libsm6                   4.3.0.dfsg.1-10 X Window System Session Management
ii  libxaw7                  4.3.0.dfsg.1-10 X Athena widget set library
ii  libxext6                 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxft2                  2.1.2-6         FreeType-based font drawing librar
ii  libxmu6                  4.3.0.dfsg.1-10 X Window System miscellaneous util
ii  libxpm4                  4.3.0.dfsg.1-10 X pixmap library
ii  libxrender1              0.8.3-7         X Rendering Extension client libra
ii  libxt6                   4.3.0.dfsg.1-10 X Toolkit Intrinsics
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu
ii  xlibs-data               4.3.0.dfsg.1-10 X Window System client data

-- no debconf information
--- xc/programs/xterm/charproc.c.orig	2005-03-13 22:48:51.000000000 -0500
+++ xc/programs/xterm/charproc.c	2005-03-13 22:51:46.000000000 -0500
@@ -6241,7 +6241,7 @@
 	&& chi == 0
 #endif
 	) {
-	clo = ' ';
+      clo = ' '; 
     }
 
     /*
@@ -6253,7 +6253,7 @@
 #if OPT_WIDE_CHARS
 	&& chi == 0
 #endif
-	&& clo == ' ') {
+	&& clo == ' ') { 
 	flags &= ~TERM_COLOR_FLAGS;
     }
 #endif
@@ -6346,8 +6346,18 @@
 	screen->cursor_GC = set_at;
 	TRACE(("ShowCursor calling drawXtermText cur(%d,%d)\n",
 	       screen->cur_row, screen->cur_col));
+	
+	/*MAR*/
+	setGC(NormalGC(screen)); 
+	flags ^= UNDERLINE;
+	if (flags & BOLDATTR(screen)) {
+	  setGC(NormalBoldGC(screen));
+	}
+	XSetForeground(screen->display, currentGC, fg_pix);
+	XSetBackground(screen->display, currentGC, bg_pix);
+	/*MAR*/
 
-	drawXtermText(screen, flags & DRAWX_MASK, currentGC,
+	drawXtermText(screen, flags & DRAWX_MASK, currentGC, 
 		      x = CurCursorX(screen, screen->cur_row, cursor_col),
 		      y = CursorY(screen, screen->cur_row),
 		      curXtermChrSet(screen->cur_row),
@@ -6464,7 +6474,7 @@
 	&& chi == 0
 #endif
 	) {
-	clo = ' ';
+      clo = ' '; 
     }
 
     TRACE(("HideCursor calling drawXtermText cur(%d,%d)\n",

Reply to: