From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5131 invoked from network); 14 Jan 1997 14:04:51 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 14 Jan 1997 14:04:51 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id JAA09037; Tue, 14 Jan 1997 09:04:45 -0500 (EST) Resent-Date: Tue, 14 Jan 1997 09:04:45 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199701141405.PAA21563@bolyai.cs.elte.hu> Subject: Re: vi-goto-column In-Reply-To: <199701141240.NAA04059@hydra.ifh.de> from Peter Stephenson at "Jan 14, 97 01:40:57 pm" To: pws@ifh.de (Peter Stephenson) Date: Tue, 14 Jan 1997 15:05:50 +0100 (MET) Cc: zsh-workers@math.gatech.edu Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL27 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"vCaSp1.0.8D2.z9vso"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2791 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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; }