diff options
author | 2018-09-10 14:19:19 -0400 | |
---|---|---|
committer | 2018-09-10 14:19:19 -0400 | |
commit | 638130774ecbd81a8438adb61385208f584659ae (patch) | |
tree | f58bab99129f23b8667c542e1703dd7938329080 /core/ui.lua | |
parent | 8f1b55bfb7dfe2272d489dc70c745e6125662a0c (diff) |
Added ability to save/restore persistent data during reset.
Diffstat (limited to 'core/ui.lua')
-rw-r--r-- | core/ui.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/ui.lua b/core/ui.lua index 87e88ffb..be5d637b 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -187,6 +187,12 @@ events.connect(events.BUFFER_AFTER_SWITCH, function() table.insert(buffers_zorder, 1, buffer) end) +-- Saves and restores buffer zorder data during a reset. +events.connect(events.RESET_BEFORE, + function(persist) persist.buffers_zorder = buffers_zorder end) +events.connect(events.RESET_AFTER, + function(persist) buffers_zorder = persist.buffers_zorder end) + --- -- Prompts the user to select a buffer to switch to. -- Buffers are listed in the order they were opened unless `zorder` is `true`, |