aboutsummaryrefslogtreecommitdiff
path: root/core/ui.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/ui.lua')
-rw-r--r--core/ui.lua6
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`,