zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: make kill ring work in vi mode
Date: Thu, 30 Oct 2014 08:53:58 +0000	[thread overview]
Message-ID: <20141030085358.3c9f9d54@pws-pc.ntlworld.com> (raw)
In-Reply-To: <15607.1414626173@thecus.kiddle.eu>

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


  parent reply	other threads:[~2014-10-30  8:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 23:42 Oliver Kiddle
2014-10-30  2:13 ` Bart Schaefer
2014-10-30  8:53 ` Peter Stephenson [this message]
2014-10-30 17:54   ` Oliver Kiddle
2014-10-31 11:35     ` Vin Shelton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141030085358.3c9f9d54@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).