Skip to content
Myr

[vim] handle SwapExists

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

The SwapExists dialog prevents multiple files from being opening if the dialog occurs before all files are opened. Opening the files is more important than showing the dialog, so choose "readonly" automatically and continue opening files.

authored by Justin M. Keyes · committed by Justin M. Keyes · parent 862da2c · Browse files · 1 file+7 added−0 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+7 added−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:plugin/fzf.vim+7 added
403 unmodified lines
404 return405 endif406 let key = remove(a:lines, 0)407 let cmd = get(s:action, key, 'e')408 if len(a:lines) > 1409 augroup fzf_swap410 autocmd SwapExists * let v:swapchoice='o'411 \| call s:warn('fzf: E325: swap file exists: '.expand('<afile>'))412 augroup END413 endif414 try415 let autochdir = &autochdir416 set noautochdir417 for item in a:lines418 execute cmd s:escape(item)419 endfor420 finally421 let &autochdir = autochdir422 silent! autocmd! fzf_swap423 endtry424endfunction425426function! s:cmd(bang, ...) abort
17 unmodified lines