Closed lindy2076 closed 9 months ago
kitty will render whatever the program running in it asks it to render. If you think there is some bug in how kitty renders thing come up with a reproducer that doesn't involve tons of other software. Chances are that software is simply doing something wrong, not following kitty's terminfo or using incorrect width calculations for unicode characters are the most common things software get wrong.
You can easily generate a reproducer by running kitty with --dump-bytes and doing the minimal amount of work to produce incorrect rendering. Then post the log generated by --dump-bytes alongwith the terminal size in cells in which it was generated.
When you do, I will take a look at it, but as I said chances are it is the client software not producing appropriate output. If the log is too large then analysing it will be too much work, and you will need to come up with a simpler reproducer.
Here it is, starting glow, switching the tab, selecting lorem ipsum md, scrolling till the end and then pressing G button to make lines look normally (288 lines) tput cols and tput lines output: 98 55
I need the log only till whatever point the render was corrupted. Simply close kitty at that point dont press G.
Same but closing after scrolling down kitty_dump2.gz
OK I'll look at it when I have some time
I managed to make it even shorter. So i just run rg --files | fzf --preview="xdg_prog {}" --bind="ctrl-space:toggle-preview" --preview-window=up,15%
and scroll up a little.
xdg_prog is a bash script that echoes two lines:
MIME=$(xdg-mime query filetype "$1")
TOOL=$(xdg-mime query default $MIME)
echo -e "Opener: $TOOL\nmime: $MIME"
P.S.
I tried to start only kitty with startx kitty
and the bug was present
Dumping those bytes in xterm gives the exact same broken rendering, see attached screenshot. So not a kitty bug.
Yeah, indeed. I have this problem in gnome-terminal too... Thanks for help!
Describe the bug When I use glow to view Markdown files or fzf with preview window I have problems with kitty rendering lines after scrolling.
I thought it was glow's issue but after installing fzf i encountered it again. I wrote an issue https://github.com/charmbracelet/glow/issues/554 where I described how to reproduce this bug. My guess is that kitty has problems rendering scrolling windows with some static window (glow has a small line of text in the bottom and fzf has a preview window on top). I use glow only in pager mode now (glow -p) because it doesn't produce "ghost" lines and don't shuffle them (it uses
less
). Also I was noticing "ghost" lines after exiting vim sometimes. My prompt showed the previous commandvim *filename*
but it was not real (it was replaced by the next command like if i had activated the insert mode in a text editor).To Reproduce Steps to reproduce the behavior:
Screenshots
glow
The original file is on the right. It is clear that glow messed some lines in the last paragraph (on the left):
But after going to the bottom by pressing G everything aligns normally (that's how the file on the right was opened)
fzf (large input, e.g.
rg --files
)After some scrolling lines became messed up
But after reopening the preview window on top everything became normal.
exiting vim
Lines messed up. The cursor is on penultimate line (one line from the bottom)
Environment details
Additional context Starting kitty with --config=none doesn't help, the problem is still present