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

When terminal windows resize, outputs are weird #32

Closed
coddoge opened this issue Jan 8, 2021 · 4 comments
Closed

When terminal windows resize, outputs are weird #32

coddoge opened this issue Jan 8, 2021 · 4 comments

Comments

@coddoge
Copy link

coddoge commented Jan 8, 2021

My SSH client is PuTTY.
When window width added, the output content still wrap line by old width.
When window height added, after output the cursor is no followed to bottom of window, scroll are broken.

@Aimeast
Copy link
Owner

Aimeast commented Jan 9, 2021

please see lastest adc00fd dev branch readme, DEMO MiniTerm not support change window size

@coddoge
Copy link
Author

coddoge commented Jan 9, 2021

I saw ResizePseudoConsole in PseudoConsoleApi.cs of MimiTerm.
Try call it on MiniTerm.Terminal class, add a method for ConnectionService.WindowChange event to call.

It seem works.

After window width changed, All outputed content will wrap line or unwrap line immediately
After windows height changed, output scroll still ok.

But i don't know it's stability.
When i run a nano.exe (git bash on windows), long line may display incorrect after window resize.
But nested run ssh to real linux, the nano is working fine.

@Aimeast
Copy link
Owner

Aimeast commented Jan 10, 2021

FxSsh is a implementation for SSH Protocol, provide interface. But the MiniTerm, it just a DEMO and copy from https://github.com/microsoft/terminal/tree/main/samples/ConPTY/MiniTerm, not a part of FxSsh.

MiniTerm has imported ResizePseudoConsole API, but not make it public. As for you said, I didn't know how different between nano.exe and linux ssh.

And the readme said, Demonstrates the basic API calls required, but not intended for "real-world" usage.

@coddoge
Copy link
Author

coddoge commented Jan 10, 2021

Thank you for reply.

@coddoge coddoge closed this as completed Jan 10, 2021
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

No branches or pull requests

2 participants