Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: copy-prev-word and 3.1.5-pws5



z69@xxxxxxx wrote:

> X-Mailing-List: <zsh-workers@xxxxxxxxxxxxxxx> archive/latest/4963
> 
> % ls
> schumacher_1995_germany_01_hr.jpg
> % mv sch<TAB>
> % mv schumacher_1995_germany_01_hr.jpg 
> (cursor is here------------------------^)
> % mv schumacher_1995_germany_01_hr.jpg <copy-prev-word ESC-^_>
> % mv schumacher_1995_germany_01_hr.jpgschumacher_1995_germany_01_hr.jpg
> 
> The whitespace introduced by completion is lost when doing the
> copy-prev-word.

The simple solution is to just make the inserted suffix be kept by
adding ZLE_KEEPSUFFIX in iwidgets.list.

Bye
 Sven

diff -c os/Zle/iwidgets.list Src/Zle/iwidgets.list
*** os/Zle/iwidgets.list	Mon Jan 25 12:57:46 1999
--- Src/Zle/iwidgets.list	Mon Jan 25 13:25:35 1999
***************
*** 26,32 ****
  "capitalize-word", capitalizeword, 0
  "clear-screen", clearscreen, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_LASTCOL | ZLE_NOTCOMMAND
  "complete-word", completeword, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_ISCOMP
! "copy-prev-word", copyprevword, 0
  "copy-region-as-kill", copyregionaskill, ZLE_KEEPSUFFIX
  "delete-char", deletechar, ZLE_KEEPSUFFIX
  "delete-char-or-list", deletecharorlist, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_ISCOMP
--- 26,32 ----
  "capitalize-word", capitalizeword, 0
  "clear-screen", clearscreen, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_LASTCOL | ZLE_NOTCOMMAND
  "complete-word", completeword, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_ISCOMP
! "copy-prev-word", copyprevword, ZLE_KEEPSUFFIX
  "copy-region-as-kill", copyregionaskill, ZLE_KEEPSUFFIX
  "delete-char", deletechar, ZLE_KEEPSUFFIX
  "delete-char-or-list", deletecharorlist, ZLE_MENUCMP | ZLE_KEEPSUFFIX | ZLE_ISCOMP

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author