From 96e9c1c24517d9e498f03e1da4ea8aef302c3be9 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 28 Nov 2011 17:50:56 -0500 Subject: Write theme changes to ~/.textadept/theme; core/gui.lua --- core/gui.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core/gui.lua') diff --git a/core/gui.lua b/core/gui.lua index 4c9e26a1..a629020a 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -144,7 +144,12 @@ function gui.select_theme() for theme in pairs(themes_found) do themes[#themes + 1] = theme end table.sort(themes) local theme = gui.filteredlist(L('Select Theme'), L('Name'), themes) - if theme then gui.set_theme(theme) end + if not theme then return end + gui.set_theme(theme) + local f = io.open(_USERHOME..'/theme', 'wb') + if not f then return end + f:write(theme) + f:close() end local connect = events.connect -- cgit v1.2.3