Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: vi-goto-column



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