vim-agriculture icon indicating copy to clipboard operation
vim-agriculture copied to clipboard

RgRaw doesn't work if g:fzf_preview_window is list

Open ipwnponies opened this issue 4 years ago • 0 comments

Latest version of fzf-vim has updated g:fzf_preview_window from a string to a list. This was to allow adding bind for toggling preview window.

From doc:

" This is the default option: " - Preview window on the right with 50% width " - CTRL-/ will toggle preview window. " - Note that this array is passed as arguments to fzf#vim#with_preview function. " - To learn more about preview window options, see --preview-window section of man fzf. let g:fzf_preview_window = ['right:50%', 'ctrl-/']

It seems like s:preview was copied from fzf-vim and needs to be updated, can be pulled from https://github.com/junegunn/fzf.vim/commit/44057cce0efde6eae4fce0b8d8dc762f255dbbfb#diff-f697bec8f1ba94d14196b753546e9fe6a486a33e10f25afb42765573c991fa0fR42

https://github.com/jesseleite/vim-agriculture/blob/1095d907930fc545f88541b14e5ea9e34d63c40f/autoload/agriculture.vim#L38-L41

But before we do that, we should consider not vendoring this function altogether. The value it added was conditionally setting g:preview_window = 'right' if the screen was wide enough but it no longer that does in upstream (maybe the logic was moved elsewhere?).

ipwnponies avatar Apr 24 '21 01:04 ipwnponies