fix buf
This commit is contained in:
+6
-4
@@ -176,10 +176,10 @@ endfunction
|
|||||||
let g:vista#renderer#enable_kind = 1
|
let g:vista#renderer#enable_kind = 1
|
||||||
let g:vista#renderer#enable_icon = 1
|
let g:vista#renderer#enable_icon = 1
|
||||||
|
|
||||||
let g:vista_last_raw = v:null
|
let g:vista_last_row = v:null
|
||||||
function VistaCursorJump()
|
function VistaCursorJump()
|
||||||
" let found = vista#util#BinarySearch(g:vista.raw, line('.'), 'line', '')
|
" let found = vista#util#BinarySearch(g:vista.raw, line('.'), 'line', '')
|
||||||
let found = g:vista_last_raw
|
let found = g:vista_last_row
|
||||||
if empty(found)
|
if empty(found)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@@ -190,18 +190,20 @@ endfunction
|
|||||||
function VistaH2()
|
function VistaH2()
|
||||||
if exists('*vista#util#BinarySearch')
|
if exists('*vista#util#BinarySearch')
|
||||||
let bufs = map(filter(copy(getbufinfo()), 'v:val.listed'), 'v:val.bufnr')
|
let bufs = map(filter(copy(getbufinfo()), 'v:val.listed'), 'v:val.bufnr')
|
||||||
if index(bufs, bufnr('%')) > 0
|
if index(bufs, bufnr('%')) < 0
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let found = vista#util#BinarySearch(g:vista.raw, line('.'), 'line', '')
|
let found = vista#util#BinarySearch(g:vista.raw, line('.'), 'line', '')
|
||||||
if empty(found)
|
if empty(found)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let g:vista_last_raw = found
|
let g:vista_last_row = found
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let count = 0
|
||||||
autocmd BufLeave * call VistaH2()
|
autocmd BufLeave * call VistaH2()
|
||||||
|
" autocmd WinLeave call VistaH2()
|
||||||
autocmd FileType vista call VistaCursorJump()
|
autocmd FileType vista call VistaCursorJump()
|
||||||
|
|
||||||
function VistaHelper()
|
function VistaHelper()
|
||||||
|
|||||||
Reference in New Issue
Block a user