bug-bash
[Top][All Lists]
Advanced

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

Re: BACKSPACE does not work on bash3.0


From: Jeff Chua
Subject: Re: BACKSPACE does not work on bash3.0
Date: Thu, 9 Sep 2004 11:45:01 +0800 (SGT)


On Wed, 8 Sep 2004, Chet Ramey wrote:

Jeff Chua wrote:

<ESC>k$<BACKSPACE><CTRL>C     <== this works for 1st time only
<ESC>k$<BACKSPACE><CTRL>C     <== deletes instead of moving left

instead of deleting in "vi overstrike" mode? It's getting a bit annoying as I'm so used to using backspace to _back_space_.

You can look at rltty.c:_rl_bind_tty_special_chars() and modify it to
your heart's content.

Chet,

The following patch checks that if vi-mode is in _overstrike_mode_, then it'll execute rl_backward_byte() instead of rl_rubout().

Backspace works now if erase is set to ^H instead of ^?.

Thanks for the pointer to get me started.

Jeff.


--- readline-5.0/text.c Thu Sep  9 11:21:09 2004
+++ readline-5.0/text.c.new     Thu Sep  9 11:21:00 2004
@@ -956,6 +956,9 @@
 rl_rubout (count, key)
      int count, key;
 {
+       if(_rl_keymap == vi_movement_keymap)
+               return (rl_backward_byte(count, key));
+
   if (count < 0)
     return (rl_delete (-count, key));






reply via email to

[Prev in Thread] Current Thread [Next in Thread]