bug-readline
[Top][All Lists]
Advanced

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

[Bug-readline] In vi insert mode, <Right> goes to last char, but not 1 c


From: Jason A. Spiro
Subject: [Bug-readline] In vi insert mode, <Right> goes to last char, but not 1 char past as it should
Date: Tue, 23 Jun 2009 01:38:06 +0000

Hi Chet,

Thanks for writing readline and bash.

I'm using Readline 5.2 and Bash 3.2 on Debian sid (testing).  Both are
set to vi mode.  In both Readline-based apps and Bash, the right arrow
doesn't work like it does in Vim or nvi.

*  In vi command mode, the right arrow key moves the cursor to the
right, and it stops on the last character in the line.  In command
mode, this behavior is fine and normal.

*  In vi insert mode, things are different.
        *  Current behavior:  In vi insert mode, the right arrow key
moves the cursor to the right, but it stops on the last character in
the line.  If the cursor is past the end of the line, it moves the
cursor to the *left*.  So, in sum, the farthest right you can go is to
the last character in the line.  This is not how any other editor
behaves.
        (Steps to reproduce what I described using bash:
        set -o vi<RET>
        asdfghjkl<Esc><Right Arrow>
        When you press <Right Arrow>, the cursor moves left.  This is
one manifestation of the problem.)
        *  Expected behavior:  In Vim insert mode and Elvis insert
mode, the right arrow key moves the cursor to the right.  The farthest
right you can go is one position past the last character in the line.
 I would like readline's and bash's right arrow key to work just like
this.

If that didn't make sense, please let me know.




reply via email to

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