[Bug] Last character leaves a trail when scrolling the list with .Xresource based terminal
Checklist
- [X] I have read through the manual page (
man fzf) - [X] I have searched through the existing issues
- [X] For bug reports, I have checked if the bug is reproducible in the latest version of fzf
Output of fzf --version
0.57.0
OS
- [X] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
Shell
- [X] bash
- [X] zsh
- [X] fish
Problem / Steps to reproduce
This bug is reproducible with st, xterm, rxvt-unicode, But not with kitty, alacritty.
Did test with default .Xresource setting.
Tested on Void Linux 6.12.6_3.
I did further research and realized the encoding of that dummy.txt on gif demo was UTF-8, And bug couldn't reproduce with ASCII.
EDIT: Upload dummy-UTF-8.txt
If the last character of the line is CJK character, bug can't reproduce. And the trail leaving the mark all over previous lines passed.
Related: #1526, #2020 Issue #2194, conditions are quiet different but quite similar.
EDIT: Further info
Thanks for the info @y0ast https://github.com/junegunn/fzf/issues/1526#issuecomment-835506019
https://github.com/junegunn/fzf/blob/fe3a9c603e924425f80b87d76adb3e80d2bc668c/src/terminal.go#L2174
t.window.CPrint(color, strings.Repeat(" ", 2 * fillSpaces))
https://github.com/junegunn/fzf/blob/fe3a9c603e924425f80b87d76adb3e80d2bc668c/src/terminal.go#L2188
t.window.Print(strings.Repeat(" ", 2 * fillSpaces))
But scrollbar not displaying properly, and layout broken with some options like header.