Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vi-goto-column
- X-seq: zsh-workers 2791
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: pws@xxxxxx (Peter Stephenson)
- Subject: Re: vi-goto-column
- Date: Tue, 14 Jan 1997 15:05:50 +0100 (MET)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199701141240.NAA04059@xxxxxxxxxxxx> from Peter Stephenson at "Jan 14, 97 01:40:57 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
Peter Stephenson wrote:
> The behaviour of vi-goto-column has changed: it now won't go to the
> last column, i.e. the space after all the characters. This was
> presumably introduced by some mistaken analogy with vi, where there is
> no space at the end of the line after the last inserted character. In
In vi you cannot put the cursor after the last character and it does not
matter wether it is a space or not. Zsh just does the same.
The patch below will probably does what you want but vi fans may oppose
this patch. POSIX.2 upe specifies the requirements for vi mode, but
unfortunately I do not have this document so I do not know how this should
behave. Bash behaves like zsh so I think the current behaviour
(ie. without the patch below) is correct.
Zoltan
*** Src/Zle/zle_move.c 1997/01/12 00:46:43 3.1.1.5
--- Src/Zle/zle_move.c 1997/01/14 13:46:03
***************
*** 181,188 ****
cs = x + zmult;
else
cs = y + zmult;
! if (cs >= y)
! cs = y - 1;
if (cs < x)
cs = x;
}
--- 181,188 ----
cs = x + zmult;
else
cs = y + zmult;
! if (cs > y)
! cs = y;
if (cs < x)
cs = x;
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author