Skip to content

Commit

Permalink
Optionally disable info message for preview window
Browse files Browse the repository at this point in the history
By setting the option g:UnicodeShowPreviewWindow one can disable the
info message for the preview window. (Patch by Marcin Szamotulski,
thanks!)
  • Loading branch information
chrisbra committed Mar 10, 2013
1 parent 7ec7c15 commit 0b5a713
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions autoload/unicode.vim
Expand Up @@ -18,6 +18,9 @@ else
"let s:unicode_URL='http://www.unicode.org/Public/UNIDATA/Index.txt'
let s:unicode_URL='http://www.unicode.org/Public/UNIDATA/UnicodeData.txt'
endif
if !exists("g:UnicodeShowPreviewWindow")
let g:UnicodeShowPreviewWindow = 0
endif

" HTML entitities
let s:html = {}
Expand Down Expand Up @@ -331,9 +334,17 @@ fu! unicode#CompleteUnicode(findstart,base) "{{{1
\ empty(dg_char) ? '' : '('.dg_char.')', nr2char(value))

if s:unicode_complete_name
call complete_add({'word':key, 'abbr':fstring, 'info': istring})
let dict = {'word':key, 'abbr':fstring}
if g:UnicodeShowPreviewWindow
call extend(dict, {'info': istring})
endif
call complete_add(dict)
else
call complete_add({'word':nr2char(value), 'abbr':fstring, 'info': istring})
let dict = {'word':nr2char(value), 'abbr':fstring}
if g:UnicodeShowPreviewWindow
call extend(dict, {'info': istring})
endif
call complete_add(dict)
endif
if complete_check()
break
Expand Down

0 comments on commit 0b5a713

Please sign in to comment.