On Sat, Apr 05, 2025 at 08:57:51AM +0000, Lucas Gabriel Vuotto wrote:
> On Sat, Apr 05, 2025 at 09:36:07AM +0200, Walter Alejandro Iglesias wrote:
> > Hi again Lucas,
> >
> > This time I paid a little more attention :-). Maybe I'm missing
> > something, but it seems to me that, in your patch, the skip_utf8_cont
> > variable is unnecessary.
> >
> > Anyway, at first I'd also tried doing something similar to what you
> > suggested, I still think it doesn't require so much fuss. Let's see if
> > I don't make any stupid mistakes with this new version of mine:
>
> anton pointed the same out in a private email and also requested
> regress modifications. The current patch is
>
I don't want to waste your time giving me C lessons, but if it's not too
long to explain, I would appreciate it if Anton, you or anyone else
could tell me what the problem (regression?) could be with just removing
the conditional, as I did in my last example:
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 5 Apr 2025 07:55:33 -0000
@@ -1194,9 +1194,7 @@ 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]))
- continue;
+ --ncursor;
break;
case 'f':
--
Walter