Skip to content
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

My CTRL-Y mapping is broken by clang_complete #358

Open
bmerry opened this issue Nov 19, 2013 · 0 comments
Open

My CTRL-Y mapping is broken by clang_complete #358

bmerry opened this issue Nov 19, 2013 · 0 comments

Comments

@bmerry
Copy link

bmerry commented Nov 19, 2013

It doesn't happen all the time - it seems to depend on how one interacts with the completion window. Steps to reproduce on Ubuntu 13.10 with gvim 7.4:

Put the following in .vimrc (and obviously do :BundleInstall if needed to install clang_complete):

set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'Rip-Rip/clang_complete'
filetype plugin indent on
syntax enable
inoremap <C-Y> <C-O>dd
let g:clang_library_path = '/usr/lib/llvm-3.4/lib'
let g:clang_complete_auto = 0

Open a .cpp and insert the following text:

#include <iostream>
int main() {
        std::cout.fl

Press <C-X><C-U> to trigger completion. Do not do anything to select a match; simply keep typing some letters, then press Enter. Now press <C-Y>: it will start copying characters from the previous line (the default i_CTRL-Y mapping) instead of deleting the current line (as specified by the .vimrc). Running inoremap <C-Y> reports the following mappings:

i  <C-Y>       *@<SNR>19_HandlePossibleSelectionCtrlY()
i  <C-Y>       * <C-O>dd

On the other hand, if after pressing <C-X><C-U> one presses <C-U> again to select the first match, then enter to dismiss the popup, the expected behaviour is restored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant