-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Checklist
- I have read through the manual page (
man fzf) - I have searched through the existing issues
- For bug reports, I have checked if the bug is reproducible in the latest version of fzf
Output of fzf --version
0.67.0 (2ab923f)
OS
- Linux
- macOS
- Windows
- Etc.
Shell
- bash
- zsh
- fish
Problem / Steps to reproduce
Run
for i in {1..200}; do string+='a̱'; printf '\e[43m%s\e[0m\n' "$string"; done | FZF_DEFAULT_OPTS= fzf --ansi --no-hscrollwhere each line is some number of times the character a followed by the zero-width COMBINING MACRON BELOW (U+0331), with yellow background colour, or
for i in {1..200}; do string+=$'a\1'; printf '\e[43m%s\e[0m\n' "$string"; done | FZF_DEFAULT_OPTS= fzf --ansi --no-hscrollwhere each line is some number of times the character a followed by the control character \1 (which I often use as a --delimiter).
In both cases, the background colour covers the whole line when it is shorter than the available width. But for longer lines, the background colour covers only about the half of the line. It looks like the ANSI colour code ‘off’ is placed after N characters (of any width), where N is the number of available columns, rather than after N cells.
In both examples above, without --no-hscroll, all lines are fully coloured. (There is still a problem, not much related to colour in the a̱ case, where the last character of a line stays in place when scrolling — this may be an instance of #1526.)