Skip to content

Commit

Permalink
fix(integrations): check that nvim-tree api functionis_visible exis…
Browse files Browse the repository at this point in the history
…ts (#17)

* fix(integrations): check that nvim-tree api function`is_visible` exists

Fixes #15

* chore: auto-generate docs

---------

Co-authored-by: declancm <[email protected]>
  • Loading branch information
declancm and declancm authored Aug 18, 2024
1 parent d727370 commit d688b66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/maximize.nvim.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*maximize.nvim.txt* For Neovim >= 0.8.0 Last change: 2024 August 02
*maximize.nvim.txt* For Neovim >= 0.8.0 Last change: 2024 August 18

==============================================================================
Table of Contents *maximize.nvim-table-of-contents*
Expand Down
2 changes: 2 additions & 0 deletions lua/maximize/integrations/tree.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
return function()
local ok, api = pcall(require, 'nvim-tree.api')
-- `is_visible` is only available since nvim-tree commit 'a774fa1'
ok = ok and api.tree.is_visible ~= nil
if not ok then
return false, nil
end
Expand Down

0 comments on commit d688b66

Please sign in to comment.