charmbracelet / glow

Render markdown on the CLI, with pizzazz! 💅🏻
MIT License
15.67k stars 336 forks source link

glow shuffles lines randomly after scrolling using u/d buttons or mouse #554

Open lindy2076 opened 7 months ago

lindy2076 commented 7 months ago

Describe the bug After some scrolling lines start to shuffle randomly.

Setup

To Reproduce Steps to reproduce the behavior:

  1. Start glow not in pager mode: glow
  2. Open any document
  3. Scroll randomly (with a mouse or by using u/d)
  4. See some lines shuffle

Expected behavior Lines shouldn't be shuffled.

Screenshots The original file is on the right. It is clear that glow messed some lines in the last paragraph (on the left): Screenshot from 2024-01-08 00-16-44 Other lines shuffle after some scrolling: Screenshot from 2024-01-08 00-17-45 It is especially sad when a code section is messed up: Screenshot from 2024-01-08 00-18-19

Additional context If a file is opened in pager mode (glow -p filename) then scrolling works fine and nothing shuffles.

Scrolling by using b/f/j/k/g/G seems to work fine. Changing pager variable in glow.yml doesn't help. I built glow from source. The latest commit in my local repo is 54dd62a2a43d36e10d075b2b3fe9b0f637f2e2b9.

lindy2076 commented 7 months ago

I guess it is related to kitty...

AnhQuanTrl commented 5 months ago

Having the same issue in alacritty. I don't think this is related to terminal emulator at all

Xiloscient commented 3 months ago

This is an issue in iterm2 also. very annoying and makes it unusable unfortunately.

Piker98988 commented 1 month ago

Having the same issue on wezterm, but some lines even disappear here!