Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. Crash when g.u == 0xf0150, 2. "textual run -c textual colors" - erresc #5

Open
aofitserov opened this issue Nov 12, 2024 · 2 comments

Comments

@aofitserov
Copy link

aofitserov commented Nov 12, 2024

  1. Crash when g.u > 0xffff (?!), possible fix the following:
diff --git a/qlightterminal.cpp b/qlightterminal.cpp
index a6a594f..1e1860d 100644
--- a/qlightterminal.cpp
+++ b/qlightterminal.cpp
@@ -259,7 +259,12 @@ void QLightTerminal::paintEvent(QPaintEvent *event) {
painter.setFont(font);
}

-            line += QChar(g.u);
+            if (0xffff < g.u) {
+                for (auto c: QStringView(QChar::fromUcs4(g.u)))
+                    line += QChar(c);
+            } else {
+                line += QChar(g.u);
+            }
}
painter.drawText(QPointF(offset, yPos), line);
yPos -= win.lineheight;
  1. "textual run -c textual colors" - mouse doesn't work. WTF? textual
erresc: unknown csi ESC[>1u
erresc: unknown csi ESC[=1;u
erresc: unknown csi ESC[?2026$p

After Ctrl+C:

erresc: unknown csi ESC[<u
@ChargeIn
Copy link
Owner

Hey, thank you for the report, I will look into it.

@ChargeIn ChargeIn self-assigned this Nov 12, 2024
@ChargeIn
Copy link
Owner

Hey, so I fixed the issues with the chars larger than 0xffff. Thanks for the diff.

So the issue with the mouse support is related to the unknown csi commands you are seeing. (https://invisible-island.net/xterm/ctlseqs/ctlseqs.html).

So the commands tell the terminal which mouse mode to use and so on. There is currently no support for these mouse modes except for the standard. So this will be a longer feature request. Since I currently do not have the time to do it I wiil leave this request open.

Also we need to fix the line height for full screen apps like the textual app.

@ChargeIn ChargeIn removed their assignment Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants