-
Notifications
You must be signed in to change notification settings - Fork 291
Add pixel size support to resize() #881
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
base: main
Are you sure you want to change the base?
Conversation
| open(cols: number, rows: number): IUnixOpenProcess; | ||
| process(fd: number, pty?: string): string; | ||
| resize(fd: number, cols: number, rows: number): void; | ||
| resize(fd: number, cols: number, rows: number, xPixel: number, yPixel: number): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about renaming this to width, height but might be confusing since we dont have the pixelSize like in interfaces.ts
Maybe widthPixel, heightPixel would be the better
| * @param pixelSize Optional pixel dimensions of the pty. | ||
| */ | ||
| resize(cols: number, rows: number): void; | ||
| resize(cols: number, rows: number, pixelSize?: { width: number, height: number }): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I just create another interface PixelSize which would have field width, height?
That way we can just say simply say pixelSize here.
| !info[2].IsNumber() || | ||
| !info[3].IsNumber() || | ||
| !info[4].IsNumber()) { | ||
| throw Napi::Error::New(env, "Usage: pty.resize(fd, cols, rows, xPixel, yPixel)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xpixel, ypixel vs. width, height vs widthPixel, heightPixel 🥸

From: xtermjs/xterm.js#5619 (comment)