@@ -123,14 +123,11 @@ M.setup = function(user_opts)
123123 local session_path = user_config .sessions .sessions_path
124124 local old_name = selected [1 ]
125125 local old_file_path = session_path .. old_name
126-
127126 local new_name = vim .fn .input (" Enter new name for the session: " , old_name )
128127
129128 if new_name and new_name ~= " " then
130129 local new_file_path = session_path .. new_name
131-
132130 os.rename (old_file_path , new_file_path )
133-
134131 vim .notify (
135132 " Session renamed from " .. old_name .. " to " .. new_name ,
136133 vim .log .levels .INFO ,
@@ -175,13 +172,25 @@ M.setup = function(user_opts)
175172 cwd = user_config .sessions .sessions_path ,
176173 actions = {
177174 [" enter" ] = M .load ,
178- [" ctrl-x" ] = { M .delete_selected , fzf .actions .resume , header = " delete session" },
179- [" ctrl-r" ] = { M .rename_selected , fzf .actions .resume , header = " rename session" },
175+ [" ctrl-x" ] = {
176+ fn = function (selected )
177+ M .delete_selected (selected )
178+ M .list ()
179+ end ,
180+ header = " delete session" ,
181+ },
182+ [" ctrl-r" ] = {
183+ fn = function (selected )
184+ M .rename_selected (selected )
185+ M .list ()
186+ end ,
187+ header = " rename session" ,
188+ },
180189 [" ctrl-n" ] = { fn = M .new , header = " new session" },
181190 },
182191 }
183192 opts = require (" fzf-lua.config" ).normalize_opts (opts , {})
184- opts = require (" fzf-lua.core" ).set_header (opts , { " actions " } )
193+ opts = require (" fzf-lua.core" ).set_header (opts )
185194
186195 --- autoload mechanism
187196 if cwd then
0 commit comments