-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
:terminal text clipped after resize #4997
Comments
This is because of #4929 (comment). As I mentioned there, instead of forcing the resize at every BufEnter/WinEnter, I think instead the terminal resize should only happen on Those who want to force it unconditionally can set up a handler:
But in most cases I think the terminal size should never be reduced, because it loses data. At least until (if ever) libvterm gains the ability to remember off-screen text. edit: @leonerd mentioned in gitter that this is currently the expected libvterm behavior. |
That makes sense. I agree with your suggestions about the default redraw behavior. Thanks for the explanation! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
But then it would be possible that you don't even see the prompt if you switch back to a smaller window with the same terminal. Basically we only have these options:
In hindsight, I'd vote for the old way (so a full merge revert), but making |
closes neovim#7538 Fix wrong window references from neovim#5310 Remove some eager resizing. Still mostly doesn't address neovim#4997.
closes neovim#7538 Fix wrong window references from neovim#7440 Remove some eager resizing. Still mostly doesn't address neovim#4997.
This comment has been minimized.
This comment has been minimized.
I still experience this with |
@sprice-janrain It does clip text, I just tried in vim8.1:
|
Ok, to clarify, i do see clipping, but if I switch back to that original terminal and then switch to Normal mode with |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
related: #2514 |
This comment has been minimized.
This comment has been minimized.
Hi. I have tested it and |
You can try building from master with Testing this feature and reporting on any issues with it (or lack thereof) will help with this. |
@clason Not sure if it's appropriate to ask you here: Is that "inserting a line into the neovim/src/nvim/terminal.c" the only way to apply the patch or do we have some flag(?) to do this? Anyway, always appreciate your (huge!) contributions to Neovim :) |
Yes, that's the only way (or check out the linked PR). |
Can I call this a success? note: but if I resize it "too much", the problem of OP seems to still persist (lines got truncated). Screen.Recording.2023-05-02.at.1.18.57.AM.mov |
Yes, as explained in the PR, the scrollback buffer does not reflow. |
I just tried stretching the output of |
nvim --version
: NVIM v0.1.5-508-g47a15d0$TERM
: rxvt-256colorActual behaviour
Text in Neovim terminal becomes clipped on the right side after reducing window size to a width smaller than what is displayed.
Expected behaviour
Terminal text return to its original unclipped after the window is temporarily narrowed.
Steps to reproduce using
nvim -u NORC
:term
and then print some long line to the screen. Initially the entire text will be displayed:If the screen is then resized (e.g. 50% width), and then resized back to 100% width, the text is now clipped at the position where it was hidden when the terminal size was reduced:
(Thanks @jalvesaq for coming up with this simple example to reproduce the issue).
The text was updated successfully, but these errors were encountered: