NetBSD Problem Report #32500

From lay@intra-tec.de  Wed Jan 11 22:12:43 2006
Return-Path: <lay@intra-tec.de>
Received: from ms-dienst.rz.rwth-aachen.de (ms-2.rz.RWTH-Aachen.DE [134.130.3.131])
	by narn.netbsd.org (Postfix) with ESMTP id BE6D463B869
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Jan 2006 22:12:42 +0000 (UTC)
Message-Id: <200601112212.k0BMCiCW021301@euklid.lan>
Date: Wed, 11 Jan 2006 23:12:44 +0100 (CET)
From: philipp.lay@rwth-aachen.de
Reply-To: philipp.lay@rwth-aachen.de
To: gnats-bugs@netbsd.org
Subject: ksh (emacs-mode) has problem deleting words with ESC+d
X-Send-Pr-Version: 3.95

>Number:         32500
>Category:       bin
>Synopsis:       ksh (emacs-mode) has problem deleting words with ESC+d
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 11 22:15:00 +0000 2006
>Originator:     Philipp Lay
>Release:        NetBSD 3.0_STABLE
>Organization:
>Environment:
System: NetBSD euklid.lan 3.0_STABLE NetBSD 3.0_STABLE (EUKLID) #40: Tue Jan 10 21:57:55 CET 2006 lay@euklid.lan:/usr/src/sys/arch/i386/compile/EUKLID i386
Architecture: i386
Machine: i386
>Description:

ksh (in emacs-mode) sets the cursor to a wrong position if you delete a
word with ESC+d (or meta+d) while the edit-buffer is "scrolled left" and
includes more characters than displayed.

>How-To-Repeat:

start /bin/ksh in emacs mode and type this (you need to add some words if your 
terminal has more then 80 columns):
aaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbb cccccccccccccccccccc dddddddddddddddddddd eeeeeeeeeeeeeeeeeeee

then go back with the cursor to the beginning of the "bbbb..."-block und use 
ESC+d to delete this block. the cursor is now at a wrong position, pressing 
CTRL+l redraws the line and shows the cursor at the right position.

>Fix:

a patch for bin/ksh/emacs.c:

--- bin/ksh/emacs.c-orig        2006-01-11 20:08:44.000000000 +0100
+++ bin/ksh/emacs.c     2006-01-11 21:40:03.000000000 +0100
@@ -583,7 +583,7 @@
         * there is no need to ' ','\b'.
         * But if we must, make sure we do the minimum.
         */
-       if ((i = x_displen) > 0)
+       if ((i = xx_cols - 2 - x_col) > 0)
        {
          j = (j < i) ? j : i;
          i = j;

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.