bubbletea icon indicating copy to clipboard operation
bubbletea copied to clipboard

Inline: rendering artifacts when resizing window

Open StarpTech opened this issue 3 years ago • 5 comments

Describe the bug A clear and concise description of what the bug is.

Setup Please complete the following information along with version numbers, if applicable.

  • OS [e.g. Ubuntu, Mac OS]: PopOS (Ubuntu)
  • Shell [e.g. zsh, fish]: zsh
  • Terminal Emulator [e.g. kitty, iterm]: no
  • Terminal Multiplexer [e.g. tmux]: no

To Reproduce Steps to reproduce the behavior:

  1. Run fancy-list example
  2. Resize the terminal multiple times to a very minimal height

Source Code Please include source code if needed to reproduce the behaviour.

Expected behavior The program should not repaint the program on multiple lines.

Screenshots Screencast_from_04-09-2023_034642_PM.webm

Additional context Replicated in Gnome Terminal, JetBrains In-built, VsCode

StarpTech avatar Apr 09 '23 14:04 StarpTech

Thanks for the report! This is a dup of #573—closing this one accordingly.

meowgorithm avatar Apr 09 '23 18:04 meowgorithm

Reopening per the discussion in #573 so we can track inline rendering separately from the altscreen efforts.

meowgorithm avatar Apr 10 '23 14:04 meowgorithm

I'm curious, what's the difference between bubbletea inline render and clearing, drawing the text manually? I can't reproduce any visual bugs when printing and updating libpgloss text to stdout directly.

StarpTech avatar Apr 10 '23 17:04 StarpTech

@meowgorithm friendly ping.

StarpTech avatar Apr 28 '23 18:04 StarpTech

I'm curious, what's the difference between bubbletea inline render and clearing, drawing the text manually? I can't reproduce any visual bugs when printing and updating libpgloss text to stdout directly.

Lip Gloss merely prints to the terminal and exits, whereas Bubble Tea manages the cursor and redraws when necessary. So when the terminal resizes Bubble Tea updates it’s renderer’s state and redraws, whereas text printed with Lip Gloss is unmanaged and remains solely in the jurisdiction of the terminal’s own renderer.

meowgorithm avatar May 01 '23 01:05 meowgorithm