On Mi, 03 Feb 2021, [email protected] wrote:

> Hi,
> 
> Just more info, a few changes to plugin/clang.vim and it seems to work ok now 
> -
> 
> --- a/plugin/clang.vim
> +++ b/plugin/clang.vim
> @@ -583,11 +583,11 @@ func! s:HasPreviewAbove()
>    let l:cwin = winnr()
>    let l:has = 0
>    " goto above
> -  wincmd k
> +  "wincmd k
>    if &completeopt =~ 'preview' && &previewwindow
>      let l:has = 1
>    endif
> -  exe l:cwin . 'wincmd w'
> +  "exe l:cwin . 'wincmd w'
>    return l:has
>  endf
>  "}}}
> @@ -1405,7 +1405,7 @@ func! s:ClangComplete(findstart, base)
>      " close preview window if empty or has no preview window above, may above
>      " other windows...
>      if empty(b:clang_cache['completions']) || !s:HasPreviewAbove()
> -      pclose
> +      "pclose
>      endif
>      " call to show diagnostics
> 
> But not sure if this is the only way forward ?

Patch 8.2.2427 and 8.2.2426 disallow changing windows in the 
completefunc. The only way forward is to contact the plugin author to 
adjust the plugin and not change windows.

BTW: When asking such questions, please make sure to mention the Vim 
version that errors out.

Best,
Christian
-- 
Verantwortlich ist man nicht nur für das, was man tut, sondern auch
für das, was man unterläßt.
                -- Laotse (chin. Philosoph, 4-3 Jhd. v.Chr.)

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20210204081443.GC258352%40256bit.org.

Raspunde prin e-mail lui