1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

fix(todo): fix todo.vim for vim74

This commit is contained in:
wsdjeg 2022-04-23 09:45:10 +08:00
parent bd9b923d0e
commit 215cf80a24
2 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,6 @@ func! s:send(msg) abort
\ } \ }
" run command curl -XPOST -H 'Content-Type: application/json' -d '{"text":"test","username":"randomuser","gateway":"gateway1"}' http://localhost:4242/api/message " run command curl -XPOST -H 'Content-Type: application/json' -d '{"text":"test","username":"randomuser","gateway":"gateway1"}' http://localhost:4242/api/message
let cmd = ['curl', '-XPOST', '-H', 'Content-Type: application/json', '-d', s:JSON.json_encode(msg), 'http://localhost:' . s:port . '/api/message'] let cmd = ['curl', '-XPOST', '-H', 'Content-Type: application/json', '-d', s:JSON.json_encode(msg), 'http://localhost:' . s:port . '/api/message']
let g:wsd = cmd
call s:JOB.start(cmd) call s:JOB.start(cmd)
endf endf

View File

@ -42,7 +42,8 @@ function! SpaceVim#plugins#todo#list() abort
call s:open_win() call s:open_win()
endfunction endfunction
let s:bufnr = 0 let s:bufnr = -1
let s:todo_jobid = -1
function! s:open_win() abort function! s:open_win() abort
if s:bufnr != 0 && bufexists(s:bufnr) if s:bufnr != 0 && bufexists(s:bufnr)
@ -155,7 +156,6 @@ function! s:exit(id, data, event ) abort
\ . "v:val.title" \ . "v:val.title"
let lines = map(deepcopy(s:todos),expr) let lines = map(deepcopy(s:todos),expr)
call s:BUFFER.buf_set_lines(s:bufnr, 0 , -1, 0, lines) call s:BUFFER.buf_set_lines(s:bufnr, 0 , -1, 0, lines)
let g:wsd = s:todos
endfunction endfunction
function! s:compare_todo(a, b) abort function! s:compare_todo(a, b) abort