From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4946 invoked by alias); 29 Dec 2013 03:05:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32196 Received: (qmail 10082 invoked from network); 29 Dec 2013 03:04:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 Date: Sun, 29 Dec 2013 04:04:56 +0100 From: Carl Drougge To: zsh-workers@zsh.org Subject: [PATCH] copy-prev-shell-word broken since 4.3.11 Message-ID: <20131229030456.GC23678@s.lundagatan.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: NetBSD 3.1 X-Eric-Conspiracy: There is no conspiracy User-Agent: Mutt/1.5.21 (2010-09-15) I used to be able to use copy-prev-shell-word to copy the word to the left of my cursor. At some point this broke, always giving the last word on the line, and I couldn't be bothered to look into it. Now I have looked at it. It works in 4.3.10, not in 4.3.11. I have never looked at the zsh source before, but hopefully this patch doesn't break something else. The bufferwords function (and the whole lexer) seems pretty, uh, frightening. --- Src/Zle/zle_misc.c.orig 2013-12-29 03:49:50.485020686 +0100 +++ Src/Zle/zle_misc.c 2013-12-29 03:35:06.661038824 +0100 @@ -843,7 +843,7 @@ if (zmult <= 0) return 1; - if ((l = bufferwords(NULL, NULL, &i, 0))) { + if ((l = bufferwords(NULL, NULL, &i, LEXFLAGS_ZLE))) { i -= (zmult-1); if (i < 0) return 1;