Bug 218632 - Can't backspace when in vi command mode when the backspace key is set to ^?
Can't backspace when in vi command mode when the backspace key is set to ^?
Status: CLOSED UPSTREAM
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pdksh (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-06 11:12 EST by Ron
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-07 07:21:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A two line patch for pdksh-5.2.14-30.3 (857 bytes, patch)
2006-12-06 11:12 EST, Ron
no flags Details | Diff

  None (edit)
Description Ron 2006-12-06 11:12:56 EST
Description of problem:
The default erase key for Linux is set to ^? (xterm).  Therefore when using the
vi editing mode, when in command mode it would advantageous to be able to
backspace using ^? (this is in addition to the h and ^H keys) as it is for the
editing mode.  For example this is how it is on SCO OpenServer’s ksh (I thinks
it’s version is @(#)Version 11/16/88g).

Version-Release number of selected component (if applicable):
@(#)PD KSH v5.2.14 99/07/13.2

How reproducible:
Always reproducible.

Steps to Reproduce:
1. Check that your erase key is set to ^? using stty.
2. EDITOR=vi; export EDITOR  #To use vi editing mode.
3. Now enter the input line editing command mode and try to backspace, you
should see that it does not.
  
Actual results:
Does not backspace.

Expected results:
Should backspace.

Additional info:
I have also submitted this to pdksh@cs.mun.ca which according to
http://www.cs.mun.ca/~michael/pdksh/ is the place to log bugs, but I think it
may be preferable to RedHat to include this on its own.
Comment 1 Ron 2006-12-06 11:12:56 EST
Created attachment 142961 [details]
A two line patch for pdksh-5.2.14-30.3
Comment 2 Karsten Hopp 2006-12-06 11:33:34 EST
do you have vim-common installed ?  (rpm -q vim-common)
Comment 3 Ron 2006-12-06 11:44:41 EST
Yes, vim-common-6.3.046-0.40E.7.  Please correct me if I'm wrong but I don't see
how this would have any effect since pdksh doesn't use an external vi or vim, it
instead uses it's own implementation of vi for command line editing (see vi.c).
Comment 4 Karsten Hopp 2006-12-07 07:21:55 EST
I've misread your report and thought you had problems which editing files with vi.
vi-mode is exactly behaving as described in the manual page. 
kill, erase werase, eof, intr and quit work only in insert mode, in edit mode
you'll have to use x for delete and X for erase (backspace).
I'll add this feature when it has been accepted upstream, though.
Comment 5 Ron 2007-04-17 12:07:58 EDT
Just a small note, in the original report I mentioned that I couldn't backspace
using the erase key as defined by stty; here backspace meant to move the cursor
from right to left without any character changes.
Therefore I think you meant in comment #4 that I'll need to use h or ^H to move
the cursor to the left.

Thanks, Ron.

Note You need to log in before you can comment on or make changes to this bug.