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

Re: zle: vi mode: wrong undo handling on fresh lines

On Mon, 27 Jan 2014 16:11:24 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Mon, 27 Jan 2014 12:43:01 +0000
> Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> > > } However, even aside from that, the change doesn't seem to
> > > } be quite right: e.g. vi-repeat (dot) can't repeat the initial insertion.
> > > 
> > > Worse than that, vi-repeat forllowing the initial insertion repeats
> > > the accept-line from the end of the previous command, thus attempting
> > > to execute the (usually partial) current command line immediately.
> I think this is starting to get somewhere, but I suspect it needs
> tweaking.  For example, should that synthesised 'i' really be an 'a'?
> Is it OK to assume we're not in insert mode when vi-repeat is executed?
> If it's not safe, I don't understand how it ever worked.

Well, I think I'm going to commit it with the "a" because (i) this
definitely seems better than what was there before in any case and (ii)
hitting "ESC" and "." after typing the start of the line, which is my
naive way of getting it to repeat, does repeat what I just inserted
because of vi's quirk of backing up a character when leaving insert
mode.  Obviously I'm not claiming this is the end of the matter.

> Some vi user will need to take over at this point.  All the action I'm
> aware of is in the functions I've changed and if you've looked at the
> code you understand it as well as I do.

This remains the case.  I will not be able to guess what vi mode's many
oddities are supposed to do.

I'm not hearing much in the way of knowledgeable direction for the
completion issue.  It probably needs some hook trying out to see
if it works.


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