From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17813 invoked by alias); 22 Sep 2013 12:38:15 -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: 31760 Received: (qmail 264 invoked from network); 22 Sep 2013 12:38:09 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.214.176 as permitted sender) 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== X-Received: by 10.182.81.41 with SMTP id w9mr15120445obx.18.1379853485264; Sun, 22 Sep 2013 05:38:05 -0700 (PDT) MIME-Version: 1.0 From: Hauke Petersen Date: Sun, 22 Sep 2013 14:37:25 +0200 Message-ID: Subject: zle: vi mode: wrong undo handling on fresh lines To: zsh-workers@zsh.org Content-Type: text/plain; charset=ISO-8859-1 Insert operations should count as a single step in the undo history, i.e. from command mode ifoou should effectively be a no-op. AFAICT, zsh handles this fine with the exception of fresh lines. For example, typing foou 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.