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

Re: _zarun:1: can't change option: vi



On Mon, Feb 17, 2025, at 10:29 AM, Eric Nielsen wrote:
> I see. So maybe it should only fail if the value is actually changing?
>
> diff --git a/Src/options.c b/Src/options.c
> index 8b37ab5e8..c5186ef2b 100644
> --- a/Src/options.c
> +++ b/Src/options.c
> @@ -887,6 +887,8 @@ dosetopt(int optno, int value, int force, char *new_opts)
>             acquire_pgrp();
>         }
>      } else if ((optno == EMACSMODE || optno == VIMODE) && value) {
> +       if (new_opts[optno] == value)
> +           return 0;
>         if (sticky && sticky->emulation)
>             return -1;
>         zleentry(ZLE_CMD_SET_KEYMAP, optno);

https://www.zsh.org/mla/workers/2025/msg00070.html

-- 
vq




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