Skip to content

Speed up "Load into vimscript". #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/clang_complete.vim
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ function! ClangComplete(findstart, base)

if g:clang_use_library == 1
python completions, timer = getCurrentCompletions(vim.eval('a:base'))
python vim.command('let l:res = ' + completions)
let l:res = pyeval('completions')
python timer.registerEvent("Load into vimscript")
else
let l:res = s:ClangCompleteBinary(a:base)
Expand Down
6 changes: 3 additions & 3 deletions plugin/libclang.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,13 @@ def getCurrentCompletions(base):
t.join(0.01)
cancel = int(vim.eval('complete_check()'))
if cancel != 0:
return (str([]), timer)
return ([], timer)

cr = t.result
if cr is None:
print "Cannot parse this source file. The following arguments " \
+ "are used for clang: " + " ".join(params['args'])
return (str([]), timer)
return ([], timer)

results = cr.results

Expand All @@ -486,7 +486,7 @@ def getCurrentCompletions(base):
result = map(formatResult, results)

timer.registerEvent("Format")
return (str(result), timer)
return (result, timer)

def getAbbr(strings):
for chunks in strings:
Expand Down