It didn't behave like that in the past, but since a few months when a terminal window is resized, buffers are resized in a pretty weird manner.

The cursor can even locate itself outside of the displayed text.

It happens when the terminal is resized in width.

behaviour example

The cursor in the right hand side buffer is located inside a true line (if you yank from there and paste it inside of the left hand side buffer you'll copy something).

The display isn't trusty : a blank line can contain text.

  • Does C-L or :redraw[!] help?
    – D. Ben Knoble
    Mar 10, 2023 at 19:54
  • ^L does work, :redraw[!] doesn't. Do you know what is the associated command so that I can imagine a solution to launch it on window resize in an automatic manner ?
    Mar 11, 2023 at 17:08
  • Control-L calls either :redraw or :redraw!, I forget which, so it’s odd they didn’t work (perhaps my notation with square brackets as “optionally” wasn’t clear?). There is an autocommand (i think) for resizing
    – D. Ben Knoble
    Mar 11, 2023 at 22:23


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.