diff --git a/init.lua b/init.lua index 30c5dbc..bc80038 100644 --- a/init.lua +++ b/init.lua @@ -81,6 +81,12 @@ local delete_all_bookmarks = ya.sync(function(state) end) local _save_last_dir = ya.sync(function(state) + state.curr_dir = { + on = "'", + desc = "~", -- FIX This might not be true, i.e. the user entry point might not be the home dir + cursor = 0, + } + ps.sub("cd", function() local folder = Folder:by_kind(Folder.CURRENT) state.last_dir = state.curr_dir @@ -90,6 +96,11 @@ local _save_last_dir = ya.sync(function(state) cursor = folder.cursor, } end) + + ps.sub("hover", function() + local folder = Folder:by_kind(Folder.CURRENT) + state.curr_dir.cursor = folder.cursor + end) end) return {