Closed 0branch closed 3 years ago
I'm having a hard time reproducing this. Do you have #config charset set to UTF-8 ?
Yes, it's UTF-8
; it looks like that's being set on the basis of LANG
. If I start TinTin++ like this,
env LANG=C ./tt++
then charset is ASCII
and I can no longer reproduce the error.
When I have LANG=en_US.UTF-8
in the environment (as I do on my Mac and Linux machines), #config charset
is UTF-8
and the cursor_check_line_modified2
error occurs.
I wonder if your keyboard is sending an 8 bit sequence instead of UTF-8.
Mind telling me the output of #info unicode ã
?
Same output on macOS and Ubuntu,
#info unicode ã
#INFO UNICODE: ã: is_utf8_head = 2 (true)
#INFO UNICODE: ã: get_utf8_size = 2
#INFO UNICODE: ã: get_utf8_width = 1
#INFO UNICODE: ã: get_utf8_index = 227 (decimal)
#INFO UNICODE: ã: get_utf8_index = e3 (hexadecimal)
That's as expected. So far I haven't been able to reproduce it. Possibly some other setting is involved?
Sure, that's possible—though I'm not sure which setting would be affecting this?
Minor update: bisected and found that the error starts occurring in v2.02.04 (which reworked some of the cursor and UTF-8 logic); I'll try and debug further this weekend.
I must have done something wrong the first time around, but it's generating the error for me now.
I'll holler back once it's fixed.
This should be fixed now in the beta version. https://mudhalla.net/tintin-beta.tar.gz
Thanks. It looks like the beta addresses the reported cases. However, I can still generate similar errors:
São Paulo
\eb
)The following stacktrace is output,
debug: goto_pos(34,0)
DEBUG_STACK[000] [000] = mainloop()
DEBUG_STACK[001] [000] = process_input(void)
DEBUG_STACK[002] [001] = check_key(%p,%d)
DEBUG_STACK[003] [001] = cursor_redraw_line(%p,%p)
Thanks, updated the beta with a fix for prev word as well.
Thanks; just tested (briefly), couldn't trigger the error.
To reproduce with the current HEAD of master (4518ea51),
#showme São Paulo
(don't press enter)I observe the error
cursor_check_line_modified2: str: 8 vs 9
after#showme
.Simpler still: input
São Paulo
and delete two words to the left. The following stacktrace is immediately printed,Pressing space triggers
cursor_check_line_modified2
errors as before.