On Sat, Apr 12, 2025 at 10:25:22AM +0200, Walter Alejandro Iglesias wrote:
> In any case, if you preffer not to remove that conditional the following
> diff also fix the first issue:
>
> Index: vi.c
> ===================================================================
> RCS file: /cvs/src/bin/ksh/vi.c,v
> diff -u -p -r1.60 vi.c
> --- vi.c 12 Mar 2021 02:10:25 -0000 1.60
> +++ vi.c 12 Apr 2025 08:06:14 -0000
> @@ -1194,9 +1194,11 @@ domove(int argcnt, const char *cmd, int
> if (!sub && es->cursor + 1 >= es->linelen)
> return -1;
> ncursor = (*cmd == 'e' ? endword : Endword)(argcnt);
> - if (!sub)
> - while (isu8cont((unsigned char)es->cbuf[--ncursor]))
> + if (!sub) {
> + while (isu8cont((unsigned char)es->cbuf[ncursor]))
> continue;
> + --ncursor;
> + }
> break;
>
> case 'f':
>
>
I relized that what I did here has no sense, I just made the while()
work as an if(). But the fact that it still solves the 'e' command
issue and that, as far as I've tested it, it doesn't seem to break
anything, I still wonder what that while conditional is for.