From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14107 invoked by alias); 28 Jan 2014 16:47:19 -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: 32312 Received: (qmail 17964 invoked from network); 28 Jan 2014 16:47:13 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc96d000004885-a8-52e7df0d01a9 Date: Tue, 28 Jan 2014 16:47:08 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: zle: vi mode: wrong undo handling on fresh lines Message-id: <20140128164708.0c7facb6@pwslap01u.europe.root.pri> In-reply-to: <140128082834.ZM21167@torch.brasslantern.com> References: <20130923213014.15f97f9e@pws-pc.ntlworld.com> <3511.1390605547@thecus.kiddle.eu> <140125111530.ZM21792@torch.brasslantern.com> <20140127124301.4144f2d9@pwslap01u.europe.root.pri> <20140127161124.2aa16b37@pwslap01u.europe.root.pri> <20140128145847.7204df4e@pwslap01u.europe.root.pri> <140128082834.ZM21167@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjluLIzCtJLcpLzFFi42I5/e/4VV3e+8+DDB4/kLE42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGXeX32MvmMpVsfjrZpYGxr/sXYycHBICJhINzTdYIGwxiQv3 1rN1MXJxCAksZZS42TqNCcJZziRxZeVURpAqFgFViYObusE62AQMJaZumg0WFxEQlzi79jxY XFjAVuL87zWsIDavgL3E9KbFYDangJXE33VTGCGGrmSWeHT6HxtIgl9AX+Lq309MEGfYS8y8 coYRollQ4sfke2BDmQW0JDZva2KFsOUlNq95yzyBUWAWkrJZSMpmISlbwMi8ilE0tTS5oDgp PddIrzgxt7g0L10vOT93EyMkDL/uYFx6zOoQowAHoxIP74Ybz4OEWBPLiitzDzFKcDArifDe 2g0U4k1JrKxKLcqPLyrNSS0+xMjEwSnVwMh57kXnJNGo33aaO/f/meiweePDNOUW4b3HmV4u EOzSupyT63jWIrFAwuJF8uQlOZXuNo2bJDyZG1eYXt3T8vDH9SPW0bJnL/6VPWbIyJns1hSw QGTis92vy9abGETYnM+YVqK++4R/4Lx73LP2dtrufne8SYJz5WZORianACMZpyvqYUrfGZRY ijMSDbWYi4oTAXBMy8UhAgAA On Tue, 28 Jan 2014 08:28:34 -0800 Bart Schaefer wrote: > 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. Except, of course, if someone has redefined "a" / "A" in vicmd to the widget delete-all-my-files-and-self-detonate. Like the viins / vicmd repeat thing you commented on, this is fundamental to the limitations of the vi change buffer. A partial fix might be to use tokens (and so tokenise & metafy the vi change buffer), but I think this can of worms is somewhat larger than that. pws