Re: libedit: Does not run input command in vi mode
Masato Asou wrote on Tue, Sep 03, 2019 at 02:39:11PM +0900:
> Does not run input command by vi editor with vi mode.
> I do the following:
> 1. set vi mode.
> $ echo "bind -v" > ~/.editrc
> 2. launch /usr/bin/ftp command.
> $ ftp
> 3. launch vi editor with ESC + v.
> ftp> ESC + v
> 4. input "help" in vi editor.
> i + help + ESC + :wq
> 5. then 'help' command does not run.
> I fix this problem with following patch. This fix is come from NetBSD
> lib/libedit/vi.c 1.46 and 1.47.
Indeed, limiting the length of the command created with vi(1) to
the length of the string the command line contained when vi(1) was
started is wrong.
Both code inspection and testing confirm that this is a bug
and that your patch is the correct fix.