Open sxyazi opened 1 year ago
There are both zero, which causes some apps don't work.
Apps must not rely on correct pixel propagation by TIOCGWINSZ. These values are intended to be 0 as a fallback Even worse - there are systems, that cannot tell a pixel size at all.
So its not returning a wrong result here, but telling you - "dont know the right value". Would be nice to see this getting fixed yes, but imho thats an issue with node-pty.
there are systems, that cannot tell a pixel size at all
Is it a non-Unix system, like Windows?
I'm developing a terminal file manager, and when I test its image preview feature, I find that I can't run it in Hyper. I need to get the actual pixel size to calculate the image's width and height -- I'm not sure how else can get it done.
You can also use CSI 14 t
to request the current text area size in pixels.
After testing, Hyper doesn't even support CSI 14 t
:
But VSCode supports it -- which also uses node-pty
and does not fully implement TIOCGWINSZ
:
Are you on latest canary? CSI 14 t
gets activated by the recently added image support and prolly will not work with older versions.
I did a quick test on the latest canary, it supports CSI 14 t
now!
[x] Your Hyper.app version is 3.4.1. Please verify you're using the latest Hyper.app version
[x] I have searched the issues of this repo and believe that this is not a duplicate
Any relevant information from devtools? (CMD+OPTION+I on macOS, CTRL+SHIFT+I elsewhere):
No
Is the issue reproducible in vanilla Hyper.app?
Yes
Issue
Can't use
ioctl
to get the correct value ofxpixel
andypixel
:There are both zero, which causes some apps don't work.
.hyper.js contents
plugins
```json { "plugins": [], "localPlugins": [] } ```