Async fixes
This commit is contained in:
parent
04ac2060e9
commit
02862ee691
11 changed files with 37 additions and 61 deletions
|
|
@ -8,17 +8,11 @@ let s:DefinitionImpl = {}
|
|||
|
||||
|
||||
function! s:DefinitionImpl.run(data)
|
||||
if len(a:data.lines) > 0
|
||||
let res = util#ParseV1(a:data.lines[0])
|
||||
call util#JumpToLocation(res.file, res.line, res.col + 1)
|
||||
else
|
||||
echohl Comment | echo "Not found"
|
||||
endif
|
||||
let res = util#ParseV1(a:data.lines[0])
|
||||
call util#JumpToLocation(res.file, res.line, res.col + 1)
|
||||
endfunction
|
||||
|
||||
|
||||
function! features#definition#run()
|
||||
call suggest#New("def", 1, 0, s:DefinitionImpl)
|
||||
call suggest#New("def", 0, 0, s:DefinitionImpl)
|
||||
endfunction
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ endfunction
|
|||
|
||||
|
||||
function! features#info#web()
|
||||
call suggest#New("def", 1, 0, s:New(1))
|
||||
call suggest#New("def", 0, 0, s:New(1))
|
||||
endfunction
|
||||
|
||||
|
||||
function! features#info#run()
|
||||
call suggest#New("def", 1, 0, s:New(0))
|
||||
call suggest#New("def", 0, 0, s:New(0))
|
||||
endfunction
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ endfunction
|
|||
|
||||
function! features#outline#run(isUpdating)
|
||||
if !a:isUpdating || s:IsOpen()
|
||||
call suggest#New("outline", 1, 1, s:OutlineImpl)
|
||||
call suggest#New("outline", 0, 1, s:OutlineImpl)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
|
|
|||
|
|
@ -7,19 +7,10 @@ let s:RenameImpl = {}
|
|||
|
||||
|
||||
function! s:RenameImpl.run(data)
|
||||
if len(a:data.lines) == 1
|
||||
return
|
||||
endif
|
||||
|
||||
let oldName = split(split(util#FirstNonEmpty(a:data.lines), " ")[2], "\\.")[-1]
|
||||
let newName = input("Rename symbol: ", oldName)
|
||||
|
||||
for line in a:data.lines
|
||||
if len(line) == 0
|
||||
continue
|
||||
endif
|
||||
|
||||
|
||||
let res = util#ParseV2(line)
|
||||
if !s:findInProject && res.file != expand("%:p")
|
||||
continue
|
||||
|
|
@ -42,6 +33,6 @@ endfunction
|
|||
|
||||
function! features#rename#run(inProject)
|
||||
let s:findInProject = a:inProject
|
||||
call suggest#New("use", 1, 1, s:RenameImpl)
|
||||
call suggest#New("use", 0, 1, s:RenameImpl)
|
||||
endfunction
|
||||
|
||||
|
|
|
|||
|
|
@ -46,15 +46,13 @@ endfunction
|
|||
|
||||
let s:UsagesDefinitionImpl = {}
|
||||
function! s:UsagesDefinitionImpl.run(data)
|
||||
" let res = util#ParseV1(a:data.lines[0])
|
||||
" call suggest#NewKnown("use", 1, res.file, res.line, res.col + 1, s:UsagesImpl)
|
||||
call suggest#New("use", 1, 1, s:UsagesImpl)
|
||||
call suggest#NewKnown("use", 0, 1, a:data.file, a:data.line, a:data.col, s:UsagesImpl)
|
||||
endfunction
|
||||
|
||||
function! features#usages#run(findInProject)
|
||||
cclose
|
||||
call setqflist([])
|
||||
let s:findInProject = a:findInProject
|
||||
call suggest#New("def", 1, 1, s:UsagesDefinitionImpl)
|
||||
call suggest#New("def", 0, 1, s:UsagesDefinitionImpl)
|
||||
endfunction
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue