From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29515 invoked by alias); 30 Oct 2014 08:59:48 -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: 33573 Received: (qmail 5596 invoked from network); 30 Oct 2014 08:59:35 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [80.3.229.105] X-Spam: 0 X-Authority: v=2.1 cv=Cq4xcxID c=1 sm=1 tr=0 a=uz1KDxDNIq33yePw376BBA==:117 a=uz1KDxDNIq33yePw376BBA==:17 a=NLZqzBF-AAAA:8 a=kj9zAlcOel0A:10 a=BrDiTsk0AAAA:8 a=xHTeOPWHszHm2Om7WZoA:9 a=CjuIK1q_8ugA:10 Date: Thu, 30 Oct 2014 08:53:58 +0000 From: Peter Stephenson To: Zsh workers Subject: Re: PATCH: make kill ring work in vi mode Message-ID: <20141030085358.3c9f9d54@pws-pc.ntlworld.com> In-Reply-To: <15607.1414626173@thecus.kiddle.eu> References: <15607.1414626173@thecus.kiddle.eu> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 30 Oct 2014 00:42:53 +0100 Oliver Kiddle wrote: > Rather than make a bunch of static variables global, I've moved the vi > put functions to zle_misc.c. So startvichange() loses 'static' instead. > Any objections or alternative suggestions to this? There's a certain > amount of commonality between the four affected functions, should I > perhaps try to factor bits out into some smaller functions? Nothing here's a real problem, though if it's possible to refactor it more neatly that's nice to have. > I'm not too happy with the way this interacts with undo. I'd prefer that > undo would revert everything to before the put instead of stepping back > through each yank-pop. This seems to be consistent with emacs though so > I'm probably stuck with it. I may also look further at what happens with > . (vi-repeat-change). You might be able to wrap the behaviour of yank-pop with a function that uses the variable recording the undo state and updates the state appropriately, but I haven't thought this through. pws