Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Overlapping data inside curses applications without any addOn #4130

Closed
shashank-gowda opened this issue Sep 22, 2022 · 9 comments
Closed

Overlapping data inside curses applications without any addOn #4130

shashank-gowda opened this issue Sep 22, 2022 · 9 comments

Comments

@shashank-gowda
Copy link

I had previously reported an issue #3914 and my issue was duplicated with #3878. I see #3878 fix is merged to Version 5.0

Now, I have upgraded the xterm js libraries to Version 5.0 but I still see the same issue.
FYI... I'm not using add on webgl in my application.

Original Issue: #3914

@jerch
Copy link
Member

jerch commented Sep 22, 2022

Your issue looks like either a terminal size issue or TERM issue to me. Plz make sure to correctly update PTY size from resizes. Whats your TERM var?
Also does it work in your standard terminal?

@shashank-gowda
Copy link
Author

Below is my Terminal settings. I'm hitting this issue when the window size is MAX.

var term = new Terminal({
cols: 150,
cursorBlink: true,
cursorStyle: "block",
scrollback: 800,
tabStopWidth: 8,
convertEol: true,
fontSize: 16
});

Yes, this works perfectly in the standard terminal.

@jerch
Copy link
Member

jerch commented Sep 29, 2022

I'm hitting this issue when the window size is MAX.

So it works correctly w'o a terminal resize? Are you sure that you update the PTY size from terminal resizes?

@shashank-gowda
Copy link
Author

Even without resize of terminal it's not working correctly. What do you mean by updating the PTY size for terminal resize?

@jerch
Copy link
Member

jerch commented Oct 2, 2022

The PTY maintains a terminal size itself. This gets used for canonical termios mode to do the line wrapping and size propagation to apps (SIGWINCH). Whenever a terminal emulator changes its [cols, rows]-size, the PTY size has to be updated, otherwise the line wrapping/cursor positioning will be wrong with nasty output bugs.

@shashank-gowda
Copy link
Author

Could please help me to update the PTY size? How to do that? What calls I need to make?

@jerch
Copy link
Member

jerch commented Oct 4, 2022

Well I cannot tell you that, as it depends on your server side integration and how you get a working PTY from the system. node-pty for example exposes a .resize method, where the new terminal size arguments go into. In C/linux it is ioctl(PTY_MASTER_FD, TIOCSWINSZ, &ws);, where ws is a struct winsize containing the new values.

@LIZIMEME
Copy link

I'm having a similar problem. The output file directory names overlap.
image

@jerch
Copy link
Member

jerch commented Dec 15, 2022

@LIZIMEME If ls print its tabbed content too far to the right leading to wrapped lines, then your TTY/PTY col size is too big.

Again - this is nothing xterm.js has control of, you have to tell the OS PTY the correct size yourself within your backend binding.

@xtermjs xtermjs locked and limited conversation to collaborators Dec 15, 2022
@Tyriar Tyriar converted this issue into discussion #4317 Dec 15, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants