Skip to content

Implement flicker free redraw and scroll #11718

Closed

Description

@kovidgoyal

Currently there are various issues with screen flicker in vim. I am sure you already know about this but I can quote issue numbers for you if you want.

Modern terminals implement atomic screen updates. Emit the BSU (Begin synchronized update) escape code, emit whatever you want, emit the ESU (End synchronized update) escape code and a supporting terminal will render everything that happens in between the two in an atomic, flicker free manner. There will be no flicker caused by partial screen updates anymore.

Terminals that are known to support it: iTerm, kitty, mintty, contour, alacritty, wezterm, foot, etc.

For details see: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036

And before you ask, no, there is no terminfo key for it.

I am not familiar with vim's codebase so cant comment on how easy/difficult it would be, but at least for some use cases, such as :redraw! and scroll it should be easy to emit the sequences before after the functions that implement these.

Activity

  1. brammool commented on Dec 17, 2022

    @brammool
    Contributor
  2. kovidgoyal commented on Dec 17, 2022

    @kovidgoyal
    Author
  3. brammool commented on Dec 17, 2022

    @brammool
    Contributor
  4. kovidgoyal commented on Dec 18, 2022

    @kovidgoyal
    Author

    Well, if you prefer flicker as an indication of "something happening" that's obviously your choice. I just wanted to make you aware that if you want flicker free drawing in vim the technology for it exists.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions