junegunn / fzf.vim

fzf :heart: vim
MIT License
9.62k stars 584 forks source link

Add preview for ":Windows" #1487

Closed felixendres closed 1 year ago

felixendres commented 1 year ago

I've added/fixed the preview for the :Windows command. Since I have preview enabled from an environment variable, all I saw in the preview pane was an error message. I'd say it is generally useful to have the preview for :Windows, so I'll offer this PR.

junegunn commented 1 year ago

Since I have preview enabled from an environment variable

I don't recommend the practice. Because fzf is a text filter program that is used for all kinds of things, and a single preview command can never handle all the different types of input.

https://github.com/junegunn/fzf#preview-window


Having said that, I've tested your patch but it doesn't properly handle an empty buffer named [No Name]. I'll see what I can do.