Skip to content

Commit

Permalink
fix: annotate deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronr committed Aug 2, 2024
1 parent 91eeb49 commit 1370a68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/auto-session/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ local function bypass_save_by_filetype()

for _, current_window in ipairs(windows) do
local buf = vim.api.nvim_win_get_buf(current_window)

-- Deprecated as 0.9.0, should update to following when we only want to support 0.9.0+
-- local buf_ft = vim.bo[buf].filetype
local buf_ft = vim.api.nvim_buf_get_option(buf, "filetype")

local local_return = false
Expand Down
2 changes: 2 additions & 0 deletions lua/auto-session/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ end
---@param file_or_dir string
---@return string
function Lib.expand(file_or_dir)
-- Deprecated as 0.9.0, should update to following when we only want to support 0.9.0+
-- local saved_wildignore = vim.o.wildignore
local saved_wildignore = vim.api.nvim_get_option "wildignore"
vim.api.nvim_set_option("wildignore", "")
---@diagnostic disable-next-line: param-type-mismatch
Expand Down

0 comments on commit 1370a68

Please sign in to comment.