Skip to content

Commit

Permalink
Improve UI API
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Dec 24, 2023
1 parent 0e4f1b8 commit de91c54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/ddu/ui.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ endfunction

function ddu#ui#visible(
\ name=b:->get('ddu_ui_name', ''), tabnr = tabpagenr()) abort
return ddu#_request('uiVisible', [a:name, a:tabnr])
return ddu#_denops_running() ?
\ ddu#_request('uiVisible', [a:name, a:tabnr]) : v:false
endfunction

function ddu#ui#winids(name=b:->get('ddu_ui_name', '')) abort
return ddu#_request('uiWinids', [a:name])
return ddu#_denops_running() ?
\ ddu#_request('uiWinids', [a:name]) : []
endfunction

0 comments on commit de91c54

Please sign in to comment.