Permalink
Browse files

Optionally disable info message for preview window

By setting the option g:UnicodeShowPreviewWindow one can disable the
info message for the preview window. (Patch by Marcin Szamotulski,
thanks!)
  • Loading branch information...
1 parent 7ec7c15 commit 0b5a713b403e2e50e92ec3fdec94f16e94be1c1a @chrisbra committed Mar 10, 2013
Showing with 13 additions and 2 deletions.
  1. +13 −2 autoload/unicode.vim
View
@@ -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 = {}
@@ -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

0 comments on commit 0b5a713

Please sign in to comment.