From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6435 invoked by alias); 3 Feb 2014 16:21:06 -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: 32344 Received: (qmail 4761 invoked from network); 3 Feb 2014 16:21:00 -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 X-Biglobe-Sender: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: zle: vi mode: wrong undo handling on fresh lines From: "Jun T." In-Reply-To: <19751.1391207572@thecus.kiddle.eu> Date: Tue, 4 Feb 2014 01:20:24 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <163F74F2-3FA8-4478-B354-491C006590C9@kba.biglobe.ne.jp> 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> <2700.1390950035@thecus.kiddle.eu> <19068.1391204240@thecus.kiddle.eu> <19751.1391207572@thecus.kiddle.eu> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.1827) 2014/02/01 07:32, Oliver Kiddle wrote: > I've attached a patch for this split-undo widget to demonstrate. I tried this split-undo patch, but if I bind to undo-complete-word(), there seems to be at least two problems. The fist is that AUTO_MENU doesn't work; when there are more than one candidates (ambiguous), hitting repeatedly does not insert the first (and next ...) candidate into the command line. This may be fixed by the patch at the end of this post. The second is that the zsh/complist module doesn't work properly.=20 When the listscroll keymap is in use, complete-word widget is equivalent to 'scroll forward one screenful', and when the menuselect keymap is in use it is equivalent to 'moves the mark to the next match'. But if is bound to undo-complete-word, it doesn't behave this way but just accepts the current command line. I don't know how to overcome this problem. As for the KEEPSUFFIX flag, the undo works fine with this flag set to split-undo widget. But I feel keeping the optional suffix like ':' or ',' when going back to the command mode may be sometimes annoying (yes it can be deleted just by hitting 'x' but I'm so lazy...). diff --git a/Src/Zle/iwidgets.list b/Src/Zle/iwidgets.list index a9791ed..7872745 100644 --- a/Src/Zle/iwidgets.list +++ b/Src/Zle/iwidgets.list @@ -102,7 +102,7 @@ "self-insert-unmeta", selfinsertunmeta, ZLE_MENUCMP | ZLE_KEEPSUFFIX "send-break", sendbreak, 0 "set-mark-command", setmarkcommand, ZLE_MENUCMP | ZLE_KEEPSUFFIX | = ZLE_LASTCOL -"split-undo", splitundo, ZLE_KEEPSUFFIX +"split-undo", splitundo, ZLE_MENUCMP | ZLE_KEEPSUFFIX "spell-word", spellword, 0 "set-local-history", setlocalhistory, 0 "transpose-chars", transposechars, 0