From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13746 invoked from network); 12 May 1998 18:48:09 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 May 1998 18:48:09 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id OAA23613; Tue, 12 May 1998 14:43:33 -0400 (EDT) Resent-Date: Tue, 12 May 1998 14:43:33 -0400 (EDT) Message-Id: <199805121843.LAA09876@bebop.clari.net> To: zsh-workers@math.gatech.edu Subject: PATCH: fix spaceinline() to fix yank (3.0.5 & 3.1.2) Date: Tue, 12 May 1998 11:43:48 -0700 From: Wayne Davison Resent-Message-ID: <"MMn9n3.0.um5.KX9Mr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3969 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu This is a patch for 3.0.5 that also needs to be applied to 3.1.2-zephram4 (though it will be offset by 30 lines or so). It fixes an annoying bug in yank where the mark gets set to the end of the yanked text rather than the beginning. The root cause of the bug is that spaceinline() is moving the mark when "mark >= cs", instead of just "mark > cs". ..wayne.. ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index: zle_utils.c @@ -56,7 +56,7 @@ ll += ct; line[ll] = '\0'; - if (mark >= cs) + if (mark > cs) mark += ct; } ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---