diff options
Diffstat (limited to 'lua/pets')
| -rw-r--r-- | lua/pets/animations.lua | 2 | ||||
| -rw-r--r-- | lua/pets/utils.lua | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/lua/pets/animations.lua b/lua/pets/animations.lua index d8749c7..a330cec 100644 --- a/lua/pets/animations.lua +++ b/lua/pets/animations.lua @@ -150,7 +150,7 @@ function M.Animation:set_next_action() } if self.state.sleeping then -- If the animation isn't currently a sleeping animtion, put the pet in it, otherwise loop the animation - if not utils.table_includes(sleeping_animations, self.current_action) then + if not vim.tbl_contains(sleeping_animations, self.current_action) then self.current_action = get_sleeping_animation() end else diff --git a/lua/pets/utils.lua b/lua/pets/utils.lua index 366de2a..dbf1191 100644 --- a/lua/pets/utils.lua +++ b/lua/pets/utils.lua @@ -88,13 +88,4 @@ function M.parse_popup_hl(highlight) ) end -function M.table_includes(table, key) - for _, value in ipairs(table) do - if value == key then - return true - end - end - return false -end - return M |