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

Newlines gets eaten on right margin on window resize #971

Closed
kar1 opened this issue Jul 22, 2021 · 2 comments
Closed

Newlines gets eaten on right margin on window resize #971

kar1 opened this issue Jul 22, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@kar1
Copy link
Contributor

kar1 commented Jul 22, 2021

Describe the bug

If I cat a file to the terminal containing lines equal to the term column width, and then grow the terminal window, the lines equal to the former width will be concatenated with the next line.

Terminal window 20 columns wide before resize:

 0        1         2
 12345678901234567890
┌────────────────────┐
│ WezTerm Window     │
├────────────────────┤
│SSSSSSSSSS          │
│EEEEEEEEEEEEEEEEEEEE│
│SSSSSSSSSS          │
└────────────────────┘

Terminal window 40 columns wide after resize:

 0        1         2         3         4
 1234567890123456789012345678901234567890
┌───────────────────────────────────────┐
│ WezTerm Window                        │
├───────────────────────────────────────┤
│SSSSSSSSSS                             │
│EEEEEEEEEEEEEEEEEEEESSSSSSSSSS         │
└───────────────────────────────────────┘

Expected result:

 0        1         2         3         4
 1234567890123456789012345678901234567890
┌───────────────────────────────────────┐
│ WezTerm Window                        │
├───────────────────────────────────────┤
│SSSSSSSSSS                             │
│EEEEEEEEEEEEEEEEEEEE                   │
│SSSSSSSSSS                             │
└───────────────────────────────────────┘

Environment (please complete the following information):

  • OS: Linux X11
  • Version: wezterm 20210721-085835-5434a2a5
  • The active keyboard layout name: DA

To Reproduce

1.) Make a file containing:

====
SS

2.) Resize the terminal window to 4 columns and cat the file
3.) Resize the terminal window to >6 columns and observe the line "====SS"

Configuration

Default config

Expected behavior

Newlines on margin right edge be preserved on terminal resize

@kar1 kar1 added the bug Something isn't working label Jul 22, 2021
@wez
Copy link
Owner

wez commented Jul 22, 2021

Thanks for taking the time to make a nice and concise test case; I've seen this happen a few times but have always been in the middle of something else and then promptly forgotten about it!

@wez wez closed this as completed in 5076fe2 Jul 22, 2021
wez added a commit that referenced this issue Jul 25, 2021
This time we set the wrapped attribute when we implicitly emit
a newline and the wrap_next flag is set.

refs: #978
refs: #971
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants