{"push_id":2650183510,"size":1,"distinct_size":1,"ref":"refs/heads/fix-conflict-with-popup-menu","head":"6cacfbbfe1cfff13042f55b2e927851159b15337","before":"2c33830f4600d726986f646f92fffd459df02111","commits":[{"sha":"6cacfbbfe1cfff13042f55b2e927851159b15337","author":{"name":"bimlas","email":"682156ba2c001129511d88c98f21be630a220f7a@gmail.com"},"message":"Fix conflict with popup menu\n\nWhen popupmenu (completion menu) is shown, disable Unite insert mode\nmappings because those conflicting with menu navigating mappings\n(`<C-n>`, `<C-p>`, `<C-j>`, etc.).\n\nI tried to refactor in to a function, but it's not prettier:\n\n```\ncall s:pum_safe_map('imap <buffer>', '<TAB>',\n      \\ '<Plug>(unite_choose_action)')\n\nfunction! s:pum_safe_map(mode, lhs, rhs) abort \"{{{\n  execute a:mode.' '.a:lhs.' pumvisible() ? \"'.a:lhs.'\" : \"'.a:rhs.'\"'\nendfunction\n```\n\nBesides this it can be rigid; changing the quotes in `rhs` will produce\nerror. For example using `\"` in `rhs` instead of `'`:\n\n```\ncall s:pum_safe_map('inoremap <silent><buffer><expr> ', '<C-d>',\n      \\ 'unite#do_actioc(\"delete\")'\n```\n\nIt would evaulate to:\n\n```\ninoremap <silent><buffer><expr> <C-d> pumvisible() ? \"<C-d>\" : \"unite#do_actioc(\"delete\")\"\n```\n\nThis is the broken part: `\"unite#do_actioc(\"delete\")\"`","distinct":true,"url":"https://api.github.com/repos/bimlas/unite.vim/commits/6cacfbbfe1cfff13042f55b2e927851159b15337"}]}
{"actor":{"display_login":"bimlas"}}