blob: 0253dd30500a0024943c9c6c42098ffbb5447dd7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
function! coreplug#fzf#create_window()
let buf = nvim_create_buf(v:false, v:true)
call setbufvar(buf, '&scl', 'no')
let width = float2nr(&columns - (&columns * 2 / 5))
let height = &lines < 18 ? &lines : 18
let opts = {
\ 'relative': 'editor',
\ 'row': float2nr((&lines - height) / 2),
\ 'col': float2nr((&columns - width) / 2),
\ 'width': width,
\ 'height': height
\}
let win = nvim_open_win(buf, v:true, opts)
call setwinvar(win, '&nu', 0)
call setwinvar(win, '&rnu', 0)
endfunction
" vi: sw=4 ts=4 noet tw=80 cc=80
|