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

Re: PATCH: make kill ring work in vi mode

On Thu, 30 Oct 2014 00:42:53 +0100
Oliver Kiddle <okiddle@xxxxxxxxxxx> 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.


Messages sorted by: Reverse Date, Date, Thread, Author