diff options
Diffstat (limited to 'plugins/console/init.lua')
-rw-r--r-- | plugins/console/init.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/console/init.lua b/plugins/console/init.lua index 862445463a2..de8a5844a68 100644 --- a/plugins/console/init.lua +++ b/plugins/console/init.lua @@ -239,8 +239,8 @@ function console.startplugin() end if (not started) then -- options are not available in startplugin, so we load the history here - local historypath = emu.subst_env(manager.ui.options.entries.historypath:value():match("([^;]+)")) - history_fullpath = historypath .. '/console_history' + local homepath = emu.subst_env(manager.options.entries.homepath:value():match("([^;]+)")) + history_fullpath = homepath .. '/' .. history_file ln.loadhistory(history_fullpath) started = true end @@ -296,11 +296,11 @@ function console.startplugin() end setmetatable(console, { - __gc = function () - if history_fullpath then - ln = require("linenoise") - ln.savehistory(history_fullpath) - end + __gc = function () + if history_fullpath then + local ln = require("linenoise") + ln.savehistory(history_fullpath) + end end}) return exports |