Skip to content

Running (neo)vim directly in a terminal emulator gives "geometry problems" sometimes... #4026

Open
@camoz

Description

  • Sway version: sway version 1.0
  • Tested on: Thinkpad X200, Samsung Chromebook Plus
  • Default config for termite, sakura, xterm
  • Default config for neovim
  • Config for vim: Only set number in ~/.vimrc

Sorry for the fuzzy title and description, I have trouble reproducing this reliably and also don't know exactly which components are at fault.

When I run termite -e 'vim /tmp/somefile.txt, I get in about 5 of 10 cases this (initial view): https://linx.li/vegwycqu.png
That is, line numbers don't start at 1 but at 5. Also, I can put my cursor in line 6 in the screenshot and then go 58 characters to the right (like if I were on line 2 of the file, which contains 58 characters). Running :redraw or :redraw! doesn't fix this. Running some vim commands like :ls fixes the top of the buffer, but not the bottom: https://linx.li/28omlm0u.png
With sakura (sakura -e /tmp/somefile.txt) that happens in almost 10 of 10 cases.
With xterm (xterm -x /tmp/somefile.txt) it happens in about 2 of 10 cases.

I experience something similar with neovim. Sometimes it works fine: https://linx.li/u28nam51.png
But sometimes I get this: https://linx.li/dswyusk8.png

Setting the window to floating mode immediately fixes the broken display of the file: https://linx.li/eb2sf5ge.png
Same goes for neovim.

Running (neo)vim from an open shell ($ vim /tmp/somefile.txt) works fine.

What I found useful for testing this:
for i in $(seq 20); do termite -e 'vim /tmp/somefile.txt'; done

Removing set number from ~/.vimrc fixes the issue for vim, but not for neovim.

How can I tell if this is a sway issue?
Unfortunately, for now I'm not able to test with different compositors / WMs under X11.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    client-compatCompatibility issues with a particular application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions