From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12010 invoked by alias); 22 Sep 2013 18:24:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31761 Received: (qmail 22611 invoked from network); 22 Sep 2013 18:24:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130922112421.ZM18920@torch.brasslantern.com> Date: Sun, 22 Sep 2013 11:24:21 -0700 In-reply-to: Comments: In reply to Hauke Petersen "zle: vi mode: wrong undo handling on fresh lines" (Sep 22, 2:37pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Hauke Petersen , zsh-workers@zsh.org Subject: Re: zle: vi mode: wrong undo handling on fresh lines MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Sep 22, 2:37pm, Hauke Petersen wrote: } } example, typing } } foou } } yields "fo" instead of the expected empty line. Expliduntantly setting Congratulations, google finds no occurrences of that outside of the zsh archive for this thread. You have officially coined a word. } function zle-line-init { zle vi-insert; }; zle -N zle-line-init } } works around this misbehavior Until the bug is fixed, try something like zle-line-init() { [[ -o vi ]] && { zle vi-cmd-mode; zle vi-insert } } } 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. Well, no. "zle -K viins" means you're still in whatever "mode" you were in before (emacs, vicmd, or viins), but have started using the keymap normally used for viins mode. Similarly "zle -K menuselect" would not magically fling you into the completion menu. "zle vi-insert" causes an actual change of mode, just as "zle menu-select" begins completion.