Ivan Delalande dixit:
>In rare occasions, when invalid UTF-8 sequences are present in the
>command line buffer, the loop in x_zots() loops indefinitely because we
>have "str < xlp" and "x_col == xx_cols", so the condition for the loop
Ouch. Thanks for noticing.
>will be true, but the actual code that increments the "str" pointer in
>the x_e_putc2 and x_e_putc3 functions is protected by the condition
>"x_col < xx_cols" which is false, and so the pointer remains at the
>same value indefinitely.
OK, will look at it. Thanks!
>This patch only fixes the infinite loop problem, not the fondamental
>problem of invalid UTF-8 sequences handling. This would really be nice
>to have something consistent there because the command line prompt
>really goes nuts when such sequences are present.
Indeed. I’ve got (long-term) plans for rewriting the entire edit
thing using wide character arrays (tbh, probably, the entire string
handling in the shell, lexer, parser, etc) and killing the current
Vi mode (possibly making a new one reusing Emacs mode functionality).
But that’s still a few months or years into the future :(
I think the current editing mode works well enough with UTF-8, which
everyone “sane” uses, and will focus on the shell programming language
first.
Nevertheless, thank you a lot for caring! Known bugs should be fixed
after all.
bye,
//mirabilos
--
[00:02] <Vutral> gecko: benutzt du emacs ?
[00:03] <gecko> nö [00:03] <gecko> nur n normalen mac
[00:04] <Vutral> argl [00:04] <Vutral> ne den editor
-- Vutral und gecko2 in #deutsch (NB: Editor? Betriebssystem.)