mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:10:04 +08:00
fix(todo.vim): remove win_getid function
This commit is contained in:
parent
2960cbd3a6
commit
bd9b923d0e
@ -50,7 +50,7 @@ function! s:open_win() abort
|
|||||||
endif
|
endif
|
||||||
botright split __todo_manager__
|
botright split __todo_manager__
|
||||||
" @todo add win_getid api
|
" @todo add win_getid api
|
||||||
let s:winid = win_getid(winnr('#'))
|
let s:winnr = winnr('#')
|
||||||
let lines = &lines * 30 / 100
|
let lines = &lines * 30 / 100
|
||||||
exe 'resize ' . lines
|
exe 'resize ' . lines
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber winfixheight nomodifiable
|
setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap cursorline nospell nonu norelativenumber winfixheight nomodifiable
|
||||||
@ -66,7 +66,7 @@ endfunction
|
|||||||
|
|
||||||
function! s:WinEnter() abort
|
function! s:WinEnter() abort
|
||||||
" @todo add win_getid api
|
" @todo add win_getid api
|
||||||
let s:winid = win_getid(winnr('#'))
|
let s:winnr = winnr('#')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" @todo Improve todo manager
|
" @todo Improve todo manager
|
||||||
@ -170,8 +170,7 @@ function! s:open_todo() abort
|
|||||||
close
|
close
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
" @todo add win_gotoid api
|
exe s:winnr . 'wincmd w'
|
||||||
call win_gotoid(s:winid)
|
|
||||||
exe 'e ' . todo.file
|
exe 'e ' . todo.file
|
||||||
call cursor(todo.line, todo.column)
|
call cursor(todo.line, todo.column)
|
||||||
noautocmd normal! :
|
noautocmd normal! :
|
||||||
|
Loading…
Reference in New Issue
Block a user