Fix#2212
# Will start rendering after 200ms, update every 100ms
fzf --preview 'for i in $(seq 100); do echo $i; sleep 0.01; done'
# Should print "Loading .." message after 500ms
fzf --preview 'sleep 1; for i in $(seq 100); do echo $i; sleep 0.01; done'
# The first line should appear after 200ms
fzf --preview 'date; sleep 2; date'
# Should not render before enough lines for the scroll offset are ready
rg --line-number --no-heading --color=always ^ |
fzf --delimiter : --ansi --preview-window '+{2}-/2' \
--preview 'sleep 1; bat --style=numbers --color=always --pager=never --highlight-line={2} {1}'
Ideally, we could only use `print -sr` to update the command history.
However, the "cd" command by ALT-C is added to the history only after we
finalize the current command by pressing an additional enter key.
i.e. The cd command from ALT-C is not visible when you hit Up arrow. But
it appears once you hit enter key.
So when the current buffer is empty, we use `zle accept-line` so that
the command history is immediately updated.
Close#2200
The new default is
{ 'window' : { 'width': 0.9, 'height': 0.6, 'highlight': 'Normal' } }
The default highlight group for the border of the popup window is
'Comment', but 'Normal' seems to be a safer choice.
If you prefer the previous default, add this to your Vim configuration file:
let g:fzf_layout = { 'down': '40%' }
(fzf will fall back to this if popup window is not supported)
- Update to latest tcell which has 24 bit Windows support
- light renderer under Windows defaults to Dark256, if possible
- Respect TCELL_TRUECOLOR
- Remove tcell 1.3 references
Use 2-space horizontal padding so that the preview content is aligned
with the candidate list when the position of the preview window is `up`
or `down`.
Close#1057Close#2120
# Initial scroll offset is set to the line number of each line of
# git grep output *minus* 5 lines
git grep --line-number '' |
fzf --delimiter : --preview 'nl {1}' --preview-window +{2}-5