Skip to content

Commit

Permalink
fix preview option of completeopt
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Feb 1, 2015
1 parent 66d8f06 commit c786f72
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugin/xpopup.vim
Expand Up @@ -390,7 +390,10 @@ fun! s:sessionPrototype.addList( list ) "{{{
if type( list[0] ) == type( '' )
call map( list, '{"word" : v:val, "icase" : 1 }' )
else
call map( list, '{"word" : v:val["word"], "menu" : get( v:val, "menu", "" ), "icase" : 1 }' )
call map( list, '{"word" : v:val["word"],'
\ . '"info": get(v:val, "info", ""),'
\ . '"menu": get(v:val, "menu", ""),'
\ . '"icase": 1 }' )
endif

let self.list += list
Expand Down Expand Up @@ -453,10 +456,17 @@ fun! s:_InitBuffer() "{{{
" non-keywords char make pum disappear.

let b:_xpp_setting_switch = g:SettingSwitch.New()

let co = {"menu":1, "menuone":1, "longest":1}
for k in split(&completeopt, ',')
let co[k] = 1
endfor
let new_completeopt = join( keys(co), ',' )

call b:_xpp_setting_switch.AddList(
\ [ '&l:cinkeys', '' ],
\ [ '&l:indentkeys', '' ],
\ [ '&completeopt', 'menu,longest,menuone' ],
\ [ '&completeopt', new_completeopt ],
\)
" \ [ '&iskeyword', '33-127,128-255' ],
" TODO '&l:ignorecase', '1'???
Expand Down

0 comments on commit c786f72

Please sign in to comment.