Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle: vi mode: wrong undo handling on fresh lines
On Jan 28, 2:58pm, Peter Stephenson wrote:
}
} > I think this is starting to get somewhere, but I suspect it needs
} > tweaking. For example, should that synthesised 'i' really be an 'a'?
}
} 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.
Sorry, I missed this when looking at your previous message. I agree
that "a" is more correct than "i" here. In fact "A" might even be a
reasonable choice.
Another thing to check is the interaction of this with push-line. Is
the right thing done if the buffer isn't empty when entering ZLE?
} > Is it OK to assume we're not in insert mode when vi-repeat is executed?
Wow, good question. vi-repeat is implemented by replaying (a subset
of) the input keystrokes, not the widget actions they are bound to ...
} > If it's not safe, I don't understand how it ever worked.
If someone were to bind vi-repeat to a keystroke in the viins keymap,
I imagine the wrong thing would happen and always has. Yep, just now
confirmed this. If that's a bug, it's not a directly related one.
} 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.
I'm not familiar enough with the undo mechanics to make and good stabs
at such a hook, I fear.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author