Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-04-26 Thread Andrej Nabergoj
ich capability was responsible for this behavior. If I add if clause to do nothing if it is dummy char in tinsertblank() function everything I tested works same as in other terminals. if (!(term.line[term.c.y][term.c.x].mode & ATTR_WDUMMY)) { memmove(&line[dst], &line[src], size * sizeof(Glyp

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-04-21 Thread Andrej Nabergoj
Now I understand a little what terminal does and what programs are responsible for. So if I use this example curses program and save output to file (with this option -o) I get this additional escape sequences after wide character (backspace, space,...) but not if I draw it on positions other than (

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-04-07 Thread Roberto E . Vargas Caballero
Quoth Andrej Nabergoj : > For the same string without curses there is no problem, so probably is > not st problem, but in other terminals I don't get such behavior. > Ok, this is an important point. It is possible that some terminfo capability has some effect on this topic. There is the option -o

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-04-02 Thread Steffen Nurpmeso
Andrej Nabergoj wrote in <20250401210626.2g25ob2s5nxng...@debian.si>: |The problem is not with lowermost, rightmost cell but one that is |two positions before rightmost, lowermost cell. Of course, if you write a wide character that takes multiple cells, we end up exactly there again. |I look

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-04-01 Thread Andrej Nabergoj
The problem is not with lowermost, rightmost cell but one that is two positions before rightmost, lowermost cell. I looked at tputc() function, but I don't know yet how to use these debugging tools. If I comment this two lines for example it renders whole character, but of course this is not a solu

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-04-01 Thread Roberto E . Vargas Caballero
Quoth Steffen Nurpmeso : > Note i have no idea and did not truly look into the issue, but > there is a problem with terminals and the lowermost, rightmost > cell. Ie i have, which names termcap/terminfo capabilities These capabilities are about when the terminal does wrapping. VT100 alike termina

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-03-31 Thread Steffen Nurpmeso
Andrej Nabergoj wrote in <20250331180240.cxujdddus55yq...@debian.si>: |wcwidth(L"😍") gives me 2 if you meant this. I tried on another laptop |(but it has debian installed too) and problem was the same. |If I print any character that has wcwidth() = 2 to the third last place |of terminal, only

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-03-31 Thread Andrej Nabergoj
wcwidth(L"😍") gives me 2 if you meant this. I tried on another laptop (but it has debian installed too) and problem was the same. If I print any character that has wcwidth() = 2 to the third last place of terminal, only half of the character is rendered. This only happens if using curses. I'v tried

Re: [dev] [st] Rendering only half of emoji in curses-based program

2025-03-30 Thread Andrej Nabergoj
The program is so small I don't need github, I apologise. If you make st window 1 row high and 9 columns wide, so string "x" should fill whole window, last emoji gets cut on half. gcc st_bug.c -DNCURSES_WIDECHAR=1 -lncursesw #include #include int main() { setlocale(LC_ALL, ""); init

[dev] [st] Rendering only half of emoji in curses-based program

2025-03-28 Thread Andrej Nabergoj
Hello, I am having an issue with wide characters not rendering correctly in my curses-based program. This happens only when wide character (e.g. emoji) is placed on third-to-last column of last row. This doesn't happen in other terminals. I made sample program: github.com/anabergojzz/try But I don