Greetings. On Sat, 15 Jun 2013 07:51:31 +0200 "Eon S. Jeon" <esj...@lavabit.com> wrote: > On Sat, Jun 15, 2013 at 01:44:19AM +0200, Christoph Lohmann wrote: > > > > The characters are displayed correctly but the cursor handling is still > > mangled. > > > Would you explain how you tested? I've done only few tests: echo & vim. > The cursor handling should be incomplete, because I used a very hacky > method to workaround the innate ASCII-ism structure.
I merged your patches into the main branch of st and found that there’s an extra ’\0’ copied over when stuff is printed, but which might be a porting problem and off‐by‐one. What’s working is selecting the wide characters, but if you select many in a row, the cursor position is moving around like in the non‐wide ter‐ minal cells and it’s jumping around. The same happens when selecting a subset of wide characters. Please try to adapt your changes to the main tree of st so it’s easier to debug. Btw. storing the UTF‐8 vs. storing the u8char: Well, that’s a big change needed to take for optimisation after wide‐characters work. For now, to get it working and have visual results, use the approach of decoding it and handling the actual width of the character. After that the longer work of making the character array in a cell a u8char and adding its wcwidth() as a variable to the struct should be done. Of course your patch could change both. I consider changing the cell struct a more er‐ ror‐prone change which needs more time. Sincerely, Christoph Lohmann