Skip to content

Commit

Permalink
fix: use the provided dir in load() and delete() (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy authored Oct 2, 2023
1 parent 31938d8 commit 7011f91
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/resession/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ M.delete = function(name, opts)
local files = require("resession.files")
local util = require("resession.util")
if not name then
local sessions = M.list()
local sessions = M.list({ dir = opts.dir })
if vim.tbl_isempty(sessions) then
vim.notify("No saved sessions", vim.log.levels.WARN)
return
Expand All @@ -184,7 +184,7 @@ M.delete = function(name, opts)
{ kind = "resession_delete", prompt = "Delete session" },
function(selected)
if selected then
M.delete(selected)
M.delete(selected, { dir = opts.dir })
end
end
)
Expand Down Expand Up @@ -435,7 +435,7 @@ M.load = function(name, opts)
local layout = require("resession.layout")
local util = require("resession.util")
if not name then
local sessions = M.list()
local sessions = M.list({ dir = opts.dir })
if vim.tbl_isempty(sessions) then
vim.notify("No saved sessions", vim.log.levels.WARN)
return
Expand Down

0 comments on commit 7011f91

Please sign in to comment.