Created attachment 161316 [details] This is how Konsole incorrectly renders Byobu's TUI SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** Recently upgraded to Konsole v23.08.0 on Arch, which broke how the console is rendered when using Byobu with tmux. Before the upgrade, using Byobu with tmux and Konsole was fine. This error occurred on two different machines after updating Konsole. Other terminal emulators on the systems all render Byobu's TUI correctly. STEPS TO REPRODUCE 1. Install Konsole v23.08.0 2. Install Byobu 3. Run `byobu`, select the tmux backend (note: I haven't tried with the screen backend) 4. The default Byobu status bar should have some text widgets in the bottom right corner. If not, hit F9 and enable the date and time widgets and hit F5 to refresh the TUI. OBSERVED RESULT Konsole fails to render the Byobu TUI correctly. To me, it looks like Konsole will render the Byobu status bar with a trailing newline where no newline should exist. EXPECTED RESULT Konsole should render Byobu in the same way as other terminal emulators on the system do, and the same way that Konsole versions prior to v23.08.0 did. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.109.0 Qt Version: 5.15.10 Kernel Version: 6.4.12 Graphics Platform: Wayland ADDITIONAL INFORMATION Here is how Byobu should be correctly rendered: https://assets.digitalocean.com/articles/byobu/2LaQz62.png I attached a screenshot of how Konsole incorrectly renders Byobu.
Created attachment 161317 [details] How Byobu should be rendered on the same system
Seems like byobu and konsole are not computing the same length for the monitor and mouse emojis (are those U+1F5B5 and U+1F5B0?), which are probably followed by VARIATION SELECTOR-16 to specify emoji presentation.
(In reply to ninjalj from comment #2) > Seems like byobu and konsole are not computing the same length for the > monitor and mouse emojis (are those U+1F5B5 and U+1F5B0?), which are > probably followed by VARIATION SELECTOR-16 to specify emoji presentation. Can confirm that removing those specific emojis fixes the issue in the OP. Adding emojis like the penguin emoji 🐧(U+1F427) works fine. Having that emoji in the status bar doesn't cause the rendering error. Using the computer emoji 🖥️ (U+1F5A5 U+FE0F) or mouse emoji 🖱️(U+1F5B1 U+FE0F) causes the error as reported in the OP. Perhaps emojis made up of multiple codepoints are causing a rendering issue here?
(In reply to AlexDeLorenzo.dev from comment #3) Can also confirm that editing a file that contains certain emojis like the computer or mouse emoji in a TUI editor like micro via Konsole also cause strange rendering errors. Not using Byobu at all in this case. I'll upload a screenshot.
Created attachment 161339 [details] TUI corruption while editing a file with certain emojis via Micro editor and Konsole
Created attachment 161552 [details] console emoji test file (text) I see no issues rendering these emoji in Konsole (version 23.08). I have Noto Color Emoji (10 pt) selected as my emoji font in the Konsole advanced settings. If you have issues rendering the attached text file in Konsole, can you report which emoji font you have enabled? Note: I didn't test byobu specifically.
(In reply to Adam Fontenot from comment #6) > Created attachment 161552 [details] > console emoji test file (text) > > I see no issues rendering these emoji in Konsole (version 23.08). I have > Noto Color Emoji (10 pt) selected as my emoji font in the Konsole advanced > settings. If you have issues rendering the attached text file in Konsole, > can you report which emoji font you have enabled? > > Note: I didn't test byobu specifically. I'm using Noto Color Emoji at 12pt
Should also mention that I'm able to confirm this bug regarding Konsole v23.08.0 and emoji rendering: https://bugs.kde.org/show_bug.cgi?id=474310
I've been thinking about this some more. As I understand it, the issue isn't specific to Byobu. Recently, we changed how Konsole renders text. Now, glyphs that take up more than one column width are rendered correctly, even if they are rendered in fonts other than the chosen monospace fonts. So most emojis are two column width characters. This is expected, as otherwise you have to scale down the font or clip the boundaries. The Foot terminal (among others) takes the same approach. The problem is that some old programs make simplistic assumptions about line length and aligning characters, e.g. if you have 70 characters, they will fit into a row 70 columns wide. This doesn't work when terminals use multiple columns for glyphs. The problem seen in Byobu is caused (if I'm not mistaken) by a custom script that adds emojis to the status line (none of the built in statuses seem to do that?). Byobu sends 70 character lines to Konsole, but these lines overflow the 70 column window width because of the emojis, so they gets wrapped. The solution is most likely to report this issue to Byobu and ask them to calculate the width of "wide" characters correctly. I'm inclined to say this is NOTABUG. In fact my issue (Bug 474310) was about the fact that Konsole is inconsistent and *doesn't* use double width for unqualified emojis that don't contain the presentation selector (even though the displayed glyph is the same)! Actually, someone reported the Byobu bug back in 2018: https://bugs.launchpad.net/byobu/+bug/1641819 As for other issues with emojis, it's possible that some editors may have trouble rendering them. If Konsole in particular is causing issues, having a reproducible test case for that would be good. For what it's worth most text editors have *never* worked for the full range of emoji for me (modern ones like Helix and Kakoune do!), so I don't really know what broken rendering would look like. But basic emoji (like in my attachment above) work fine for me in every editor I've tested.
Going to close this one as an upstream issue with Byobu. Other terminal applications that break when rendering wide characters should have bugs reported against them as well. Other Konsole issues with rendering emojis are handled in other bugs. If there's a specific test case for an issue with Konsole, this can be reopened.