Skip to content

Commit

Permalink
Use float window when completing library names
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvesaq committed Apr 15, 2021
1 parent e6e9b31 commit 308fe64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/common_global.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3307,6 +3307,10 @@ function FormatInfo(width, needblank)
let info = ''
if ud['cls'] == 'a'
let info = ' ' . FormatTxt(ud['argument'], ' ', " \n ", a:width - 1)
elseif ud['cls'] == 'l'
let info = ' ' . FormatTxt(ud['ttl'], ' ', " \n ", a:width - 1) . ' '
let info .= "\n————\n"
let info .= ' ' . FormatTxt(ud['descr'], ' ', " \n ", a:width - 1)
else
if ud['descr'] != ''
let info = ' ' . FormatTxt(ud['descr'], ' ', " \n ", a:width - 1) . ' '
Expand Down Expand Up @@ -3686,7 +3690,8 @@ function GetListOfRLibs(base)
call filter(pd, 'v:val =~ "^" . a:base')
for line in pd
let tmp = split(line, "\x09")
call add(argls, {'word': tmp[0], 'menu': tmp[1], 'info': "Description: " . tmp[2]})
call add(argls, {'word': tmp[0]})
let s:user_data[tmp[0]] = {'ttl': tmp[1], 'descr': tmp[2], 'cls': 'l'}
endfor
endif
return argls
Expand Down

0 comments on commit 308fe64

Please sign in to comment.