Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zle: vi mode: wrong undo handling on fresh lines
- X-seq: zsh-workers 31760
- From: Hauke Petersen <hkptrsn@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zle: vi mode: wrong undo handling on fresh lines
- Date: Sun, 22 Sep 2013 14:37:25 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=1mlbVDzMEvFkfdzyViLax2Hs67Uw4iPpiEEmEvINYkQ=; b=D5KxilRqCnSc1IJmp7wc/BNOwuyXcT03ZnTZ5mgQ0sWtixSb0WZ8Vua+Q9igKVCuyQ kbnsGUpHgRIJtls0GhblRAj8EdZsueBgS61vKsPCMHHZA38owsKgsoARlyCVYvxEmxz6 G5qxOxtKUlkv2GQbrvDCbjvxt9BD2l8LSD9PA2lsyOrC7CbHTmykZaXfI009C1rdV9RN ZweCPvDv9fPVrIgOnjHJbc5RdneHNJDIyJwKzq4rMFXnUhu9kUDPutminzjS8/jF1l9B ESdfdrQmd6g4nT8wjeYQVJfh/sr/XNNOF2VXtz8+oYuZk/02klfw5J5AIJCYZEw/6k1a TiMQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Insert operations should count as a single step in the undo history,
i.e. from command mode
ifoo<ESC>u
should effectively be a no-op.
AFAICT, zsh handles this fine with the exception of fresh lines. For
example, typing
foo<ESC>u
yields "fo" instead of the expected empty line. Expliduntantly setting
function zle-line-init { zle vi-insert; }; zle -N zle-line-init
works around this misbehavior (and I ran with it for a while) but
leads to undesired behavior in places that I can't quite remember now.
As an aside, `zle -K viins' does not have the same effect as `zle
vi-insert' here, when I expected them to be functionally equivalent.
This is on 5.0.2 but has been the case for as long as I can remember.
I thought I had posted this to the ML before but apparently have not.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author