aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-08-08 18:58:27 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2013-08-08 18:58:27 -0400
commit3766039d04993f70c1045b1740c01e21530cd828 (patch)
tree9a4d740bbb338975b3b11e6b58c119842b9d6d3f /core
parent0e034d6337d867bb66f444d503c34f06d4f5a54f (diff)
Theme properties passed to `gui.set_theme()` should persist; core/gui.lua
Diffstat (limited to 'core')
-rw-r--r--core/gui.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/gui.lua b/core/gui.lua
index a5c3b3c2..9d17cae4 100644
--- a/core/gui.lua
+++ b/core/gui.lua
@@ -24,6 +24,7 @@ module('gui')]]
local theme = package.searchpath(not CURSES and 'light' or 'term',
_USERHOME..'/themes/?.lua;'..
_HOME..'/themes/?.lua')
+local theme_props = {}
-- Helper function for printing messages to buffers.
-- @see gui._print
@@ -194,7 +195,7 @@ function gui.set_theme(name, ...)
for j = 1, #props, 2 do buffer.property[props[j]] = props[j + 1] end
end
gui.goto_view(current_view)
- theme = name
+ theme, theme_props = name, props
end
local events, events_connect = events, events.connect
@@ -202,6 +203,8 @@ local events, events_connect = events, events.connect
-- Loads the theme and properties files.
local function load_theme_and_settings()
dofile(theme)
+ local props = theme_props
+ for i = 1, #props, 2 do buffer.property[props[i]] = props[i + 1] end
dofile(_HOME..'/properties.lua')
if lfs.attributes(_USERHOME..'/properties.lua') then
dofile(_USERHOME..'/properties.lua')