> -----Original Message-----
> From: ice_2001cn [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, May 17, 2006 4:48 AM
> To: vim@vim.org
> Subject: About CursorHoldI , pumvisible()
> 
> 
> au! CursorHoldI *.cpp nested call PreviewWord() func! PreviewWord()
>       if pumvisible()
>               call confirm('pumvisible')
>               return
>       endif
>       call confirm('xxxxxxxx'+pumvisible())
> endf
> 
> 
> I found, while I use <c-x><c-u> for a cpp code completion, 
> The code shown above allways show a message "xxxxxxxx0"
> why?

Hmm, where I can't specifically comment on your problem, I can show you some
code I wrote that does work in this situation for the sqlcomplete.vim
plugin.

imap <buffer> <c-right>  <C-R>=sqlcomplete#DrillIntoTable()<CR>

function! sqlcomplete#DrillIntoTable()
    " If the omni popup window is visible
    if pumvisible()
        call sqlcomplete#Map('column')
        " C-Y, makes the currently highlighted entry active
        " and trigger the omni popup to be redisplayed
        call feedkeys("\<C-Y>\<C-X>\<C-O>")
    else
        if has('win32')
            " If the popup is not visible, simple perform the normal
            " <C-Right> behaviour
            exec "normal! \<C-Right>"
        endif
    endif
    return ""
endfunction

I would suggest trying something other than i_CTRL-X_CTRL-U to see if the
behaviour is any different.

HTH,
Dave


Reply via email to