Skip to content

mixed up buffered data in demo #4485

@jerch

Description

@jerch

Repo:

  • spawn demo terminal with a col width of multiples of 10
  • exec python3 -c "print(''.join(['e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301e\u0301#' for i in range(1000000)]))", which inserts 9 combined char + '#' over and over

Expected:

  • '#' position should not change col

Results:

  • Firefox: all good, no weirdness in scrollback
  • safari, all good, no weirdness in scrollback
  • recent chromium (on linux, 112.0.5615.49) - '#' shifts around indicating that something is wrong with buffer contents. Scrolling through scrollback reveals this:
    grafik

For some non obivous reason the initial shell prompt occurs in the middle of the scrollback again. This behavior is stable across all renderers in chromium, therefore my guess is that the buffer is partially broken. I cannot provoke the same in firefox or safari, which makes me wonder if we have chrome specific code somewhere or if this is a real chrome bug.

Still needs more digging...

Edit - some more tests:

  • ttyd 1.7.3 (based on xterm.js 5.1)
    • with firefox: cannot repro
    • with webkit: cannot repro
    • with chrome (again same chrome as above): repro'ed
  • vscode 1.77.3 terminal (internal chromium 102.0.5005.196) - cannot repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething is misbehaving

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions