I am using vim70f on WinXP SP2.

function! sqlcomplete#DrillIntoTable()
    if pumvisible()
         exec "normal! i\<C-Y>"
         " call sqlcomplete#Map('column')
         call feedkeys("\<C-X>\<C-O>")
    endif
     return ""
Endfunction

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

When the omni popup is visible, to get the current selected item you must
press <C-Y> while in insert mode (and the list visible).  I am trying to
issue a <C-Y> from within my function.  All attempts so far have failed.  My
latest attempt is this line:
         exec "normal! i\<C-Y>"

As soon as the above line executes Vim crashes.

So Bram, this is 2 things:
1.  A bug report.
2.  A question, how can I issue a <C-Y> from within a function executing
during an imap?

TIA,
Dave


Reply via email to