rhysd/vim.wasm

Text artifacts on changes

xentripetal opened this issue · 6 comments

Describe the bug
Text artifacts are visible on any large changes to text.

Steps To Reproduce
Open vim.wasm, enter insert mode to remove the starter text.

Expected behavior
All previous text should be gone and no white marks of a previous text should be visible.

Actual behavior
There are white marks of the previous text

Screenshots/DevTools console (if possible)
https://i.imgur.com/IwlLIJv.gif

Your environment:

  • OS: Windows 10
  • Browser: Firefox and Edge
  • Browser Version: 66.0.3 and 44.17763.1.0

Additional context (if any)
Tested with both browsers at different window sizes.
Tested on 1920x1080 and 3840x2160 resolution
Testing device has embedded graphics and a dedicated GPU

Note on further inspection, all of the artifacts seem to where the font characters went below their background highlight. Possible that the font is misaligned?

rhysd commented

I guess it's depending on your monospace font configuration of browser. Since this project uses <canvas> to draw screen, drawing/removing/scrolling text are implemented in TypeScript. And the implementation would not be perfect for every font.

And providing screenshot of the artifacts would be helpful to understand what is going wrong.

And providing screenshot of the artifacts would be helpful to understand what is going wrong.

@rhysd There is already a GIF showing the issue in the original post. Should I add additional screenshots?

rhysd commented

I'm sorry I missed the link.

rhysd commented

I could also reproduce this with Firefox on macOS.

rhysd commented

I could fix this. I'll deploy new build today.

tmp