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 resize window's height from big to small, some lines in vim mode missing #359

Open
laker-sbb opened this issue Dec 22, 2024 · 0 comments

Comments

@laker-sbb
Copy link

laker-sbb commented Dec 22, 2024

  1. Adjust the window's height to half of its original size
  2. Open Vim and load any text file that spans more than one screen in height.
  3. Scroll down using the down arrow key until the content exceeds one screen height.
  4. Exit Vim, reopen the same file, and repeat step 2. You may notice that some lines are missing from the display.

FYI
Upon reviewing your source code, I discovered that the "willBufferBeTrimmed" variable in the Terminal.swift file is set to false during window resizing. This results in an increase in the buffer.yDisp value when scrolling past the point where the number of rows exceeds the height of one screen. However, if I first resize the window to a larger size and then resize it back to a smaller one, "willBufferBeTrimmed" becomes true, and everything functions correctly. This issue persists regardless of how many times I repeat the process.

This may help you identify the issue.

correctVim

incorrectVim

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

1 participant