From 3766039d04993f70c1045b1740c01e21530cd828 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 8 Aug 2013 18:58:27 -0400 Subject: Theme properties passed to `gui.set_theme()` should persist; core/gui.lua --- core/gui.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/gui.lua') 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') -- cgit v1.2.3