Open lokxii opened 6 months ago
I can only tell that some calculations are wrong in this function to cause *bytes
not being properly set, causing the do while loop in ncplane_puttext()
to loop infinitely
ncplane_puttext()
can print text normally when I add one more 1 column wide character to the second line of the string. For example
std::string text = "おなかがすいたし眠いのでナイトシティに帰ります\n私は最寄駅のことをナイトシティと22分前から呼んでいます";
thanks for the report! i'll look into this as soon as i can, hopefully very soon.
I replaced my use of ncplane_puttext()
with ncplane_putstr_yx()
because I only need to print align to left. Then I realized why do we need ncplane_puttext()
when ncplane_putstr*()
basically do all the jobs of ncplane_puttext()
?
I replaced my use of
ncplane_puttext()
withncplane_putstr_yx()
because I only need to print align to left. Then I realized why do we needncplane_puttext()
whenncplane_putstr*()
basically do all the jobs ofncplane_puttext()
?
ncplane_puttext()
does way more than ncplane_putstr()
. it's intended for putting multiple lines of text.
Interesting. Cuz I used ncplane_putstr_yx()
to print that multiline string to give the expected result of ncplane_puttext()
Edit: sorry, pressed the wrong button closing the commit
Interesting. Cuz I used
ncplane_putstr_yx()
to print that multiline string to give the expected result ofncplane_puttext()
yeah, ncplane_putstr()
will move to the next line, but it won't intelligently split lines so that words aren't broken across lines etc.
Edit: sorry, pressed the wrong button closing the commit
no worries! i definitely want to get this resolved either way.
I have this following code that causes the problem
I am using notcurses just compiled from latest commit on master branch, an Kitty terminal v0.31.0 When I remove the number 2 from the string,
ncplane_puttext
prints the string properly.