Bug#547443: xterm: wrong backspace key behavior in xterm{16,256,88}-color
Package: xterm
Version: 248-1
Severity: wishlist
I've just noticed that the xterm{16,256,88}-color terminfo entries have
wrong backspace behavior, because they are derived from xterm-new rather
than xterm-debian; thus they have kbs=^H instead of kbs=\177 as it's
supposed to be in Debian.
Most applications do not care about that, but the ne¹ editor is picky
and deletes forward instead of backward when you hit the backspace key.
I'm going to correct this in ncurses², but as the xterm.ti in ncurses is
just a gunzipped copy of /usr/share/doc/xterm/xterm.terminfo.gz, it
would be nice if we could keep the patches in sync.
Attached is a patch for debian/patches/900_debian_xterm.diff, it is a
bit noisy because "quilt refresh" had to update some fuzzy lines in
unrelated files.
¹ http://packages.debian.org/sid/ne
² http://git.debian.org/?p=users/joachim-guest/ncurses.git;a=commit;h=db203a5a4d30f9b3effaf746c38b8bad0aa5b5f8
>From a7092a6cf56f8bfef23501a6bab5a7325a8835c2 Mon Sep 17 00:00:00 2001
From: Sven Joachim <svenjoac@gmx.de>
Date: Sat, 19 Sep 2009 21:25:57 +0200
Subject: [PATCH] Derive xterm{16,256,88}-color from xterm-debian
With TERM=xterm-256color, the backspace key would delete forward in
the "ne" text editor. Using kbs=\177 corrects that and brings these
terminals in line with Debian policy.
---
debian/patches/900_debian_xterm.diff | 53 ++++++++++++++++++++++-----------
1 files changed, 35 insertions(+), 18 deletions(-)
diff --git a/debian/patches/900_debian_xterm.diff b/debian/patches/900_debian_xterm.diff
index f455a30..27d678f 100644
--- a/debian/patches/900_debian_xterm.diff
+++ b/debian/patches/900_debian_xterm.diff
@@ -21,10 +21,15 @@ Make Debian-specific tweaks to xterm:
This patch by Branden Robinson.
-Index: xterm/termcap
-===================================================================
---- xterm.orig/termcap
-+++ xterm/termcap
+---
+ XTerm-col.ad | 42 +++++++++++++++++++++++++++---------------
+ XTerm.ad | 4 ++++
+ termcap | 11 ++++++++++-
+ terminfo | 14 +++++++++++---
+ 4 files changed, 52 insertions(+), 19 deletions(-)
+
+--- a/termcap
++++ b/termcap
@@ -71,6 +71,14 @@
:so=\E[7m:sr=\EM:st=\EH:te=\E[?1049l:ti=\E[?1049h:\
:ue=\E[24m:up=\E[A:us=\E[4m:ve=\E[?25h:vi=\E[?25l:
@@ -48,10 +53,8 @@ Index: xterm/termcap
+ :tc=xterm-debian:
+# :tc=xterm-new:
# :tc=xterm-r6:
-Index: xterm/terminfo
-===================================================================
---- xterm.orig/terminfo
-+++ xterm/terminfo
+--- a/terminfo
++++ b/terminfo
@@ -955,6 +955,13 @@
u8=\E[?1;2c,
u9=\E[c,
@@ -66,6 +69,24 @@ Index: xterm/terminfo
#
# The xterm-new description has all of the features, but is not completely
# compatible with vt220. If you are using a Sun or PC keyboard, set the
+@@ -1393,7 +1400,7 @@
+ setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm,
+ setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m,
+ setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m,
+- use=xterm-new,
++ use=xterm-debian,
+ #
+ # This uses RGB values 0..1000
+ #
+@@ -1408,7 +1415,7 @@
+ setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
+ setb@,
+ setf@,
+- use=xterm-new,
++ use=xterm-debian,
+ xterm-88color|xterm with 88 colors,
+ colors#88,
+ pairs#7744,
@@ -1935,5 +1942,6 @@
# is widely used for a variety of incompatible terminal emulations including
# color_xterm and rxvt.
@@ -74,10 +95,8 @@ Index: xterm/terminfo
+ use=xterm-debian,
+# use=xterm-new,
# use=xterm-r6,
-Index: xterm/XTerm.ad
-===================================================================
---- xterm.orig/XTerm.ad
-+++ xterm/XTerm.ad
+--- a/XTerm.ad
++++ b/XTerm.ad
@@ -121,6 +121,10 @@
*tek4014*font3: 6x13
*tek4014*fontSmall: 6x10
@@ -89,11 +108,9 @@ Index: xterm/XTerm.ad
! If xterm is built with a toolbar, the widget hierarchy looks like this,
! showing widget name / class names. The complete menu hierarchy is built
! at startup because it is needed to make the layout work for the menubar:
-Index: xterm/XTerm-col.ad
-===================================================================
---- xterm.orig/XTerm-col.ad
-+++ xterm/XTerm-col.ad
-@@ -7,9 +7,9 @@
+--- a/XTerm-col.ad
++++ b/XTerm-col.ad
+@@ -6,9 +6,9 @@
*VT100*boldColors: on
*VT100*dynamicColors: on
@@ -106,7 +123,7 @@ Index: xterm/XTerm-col.ad
! - OR -
! Uncomment this for black text on a "white" background.
-@@ -114,20 +114,32 @@
+@@ -113,20 +113,32 @@
*Form.background: AntiqueWhite
*form.background: AntiqueWhite
--
1.6.4.3
Reply to: