Skip to content
Myr

[vim] Improved compatibility with sidebar plugins (e.g. NERDtree)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent f22b83d · Browse files · 1 file+14 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+14 added−7 removed

  • other:+14 added−7 removed

1 file+14 added−7 removed

modified:plugin/fzf.vim+14 added-7 removed
225 unmodified lines
226endfunction227228function! s:split(dict)229 let directions = {230 \ 'up': ['topleft', &lines],231 \ 'down': ['botright', &lines],232 \ 'left': ['vertical topleft', &columns],233 \ 'right': ['vertical botright', &columns] }230 \ 'up': ['topleft', 'resize', &lines],231 \ 'down': ['botright', 'resize', &lines],232 \ 'left': ['vertical topleft', 'vertical resize', &columns],233 \ 'right': ['vertical botright', 'vertical resize', &columns] }234 let s:ptab = tabpagenr()235 try235 for [dir, pair] in items(directions)236 for [dir, triple] in items(directions)237 let val = get(a:dict, dir, '')238 if !empty(val)238 let [cmd, max] = pair239 execute cmd s:calc_size(max, val).'new'239 let [cmd, resz, max] = triple240 let sz = s:calc_size(max, val)241 execute cmd sz.'new'242 execute resz sz243 return244 endif245 endfor246 if s:present(a:dict, 'window')
11 unmodified lines
258 call s:split(a:dict)259260 let fzf = { 'buf': bufnr('%'), 'dict': a:dict, 'temps': a:temps }261 function! fzf.on_exit(id, code)262 let tab = tabpagenr()263 execute 'bd!' self.buf264 if s:ptab == tab265 wincmd p266 endif267 call s:pushd(self.dict)268 try269 call s:callback(self.dict, self.temps)270 finally
88 unmodified lines