Skip to content

Visual selection artifacts remain after exiting vim with ghostty core #83

@RichardBray

Description

@RichardBray

Description

When using the ghostty core (@wterm/ghostty), highlighting text in vim with visual selection and then exiting vim leaves grey block artifacts on the main screen. The cells retain their reverse/highlight styling instead of being cleared when switching back from the alternate screen buffer.

Screenshot

Image

The grey blocks at the top of the terminal are leftover visual selection highlights from vim.

Console warnings

The following warnings appear in the console during vim usage, some of which may be related:

[ghostty-vt] ignoring CSI 22/23 t with extra parameters: ESC [ { 22, 1 } t
[ghostty-vt] unknown CSI m with intermediate: 37
[ghostty-vt] unknown CSI m with intermediate: 63
[ghostty-vt] ignoring CSI 22/23 t with extra parameters: ESC [ { 23, 1 } t

The unrecognized SGR sequences (intermediates 37, 63) may be related to the styling not being cleared properly on buffer switch.

Steps to reproduce

  1. Use @wterm/ghostty as the terminal core
  2. Connect to a backend with a real shell
  3. Open a file in vim (vi somefile)
  4. Enter visual mode (v) and highlight some text
  5. Exit vim (:q)
  6. Grey block artifacts remain on screen from the visual selection

Environment

  • @wterm/ghostty: ^0.3.0
  • @wterm/react: ^0.3.0
  • Backend: node-pty over WebSocket

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions