Closed mckellygit closed 3 years ago
I think there are a few other places where this can happen.
I will continue to look and update this PR.
For example I see this from diagnostic window -
Error detected while processing function ClangComplete[2]..
Might have to start disagnostic window some other way ...
Perhaps moving the diagnosticswindow to after complete is done, as in -
au CompleteDone <buffer> if ! empty(b:clang_cache['diagnostics']) && b:clang_state['state'] == 'ready' | call <SID>DiagnosticsWindowOpen(expand('%:p:.'), b:clang_cache['diagnostics']) | endif
would be ok ?
I just put that logic into ShrinkPreviewWindow()
Hi @mckellygit thank you for your nice work ! better to rename ShrinkPreviewWindow to OpenDiagAndShrinkPreviewWindow ?
ok, good idea. I just changed the name. But should we always do this now and not do the -
if !has("patch-8.2.2426")
call s:DiagnosticsWindowOpen(expand('%:p:.'), b:clang_cache['diagnostics'])
endif
If so then I'll remove these lines and the version check in OpenDiagAndShrinkPreviewWindow() thx, -m
It seems that we can remove the test line if !has("patch-8.2.2426")
, and keep compatible with version has 'patch-8.2.2426' or not
ok, I removed the - call s:DiagnosticsWindowOpen() So now that only happens in ShrinkPreviewWindow() from the CompleteDone autocmd. It changes a little bit when it shows up (after the complete func ends) but its consistent and seems ok to me. thx, -m
Thanks again.
@justmao945 hi, Thank you for this awesome plugin.
Here is an update needed since vim changes in 8.2.2426, 7 Not sure if there are better things to check/do other than just skipping these ?
Without this I get many - Error detected while processing function ClangComplete[2]..31_ClangComplete[62]..31_HasPreviewAbove:
E565: Not allowed to change text or change window
thx, -m