diff options
author | 2011-11-28 17:50:56 -0500 | |
---|---|---|
committer | 2011-11-28 17:50:56 -0500 | |
commit | 96e9c1c24517d9e498f03e1da4ea8aef302c3be9 (patch) | |
tree | 4cea17bfbee09e49b4a77c0080b6f30c05ca876e | |
parent | f253d1ecd3fc825e2d04614c72fe2cb4372e2a2b (diff) | |
download | textadept-96e9c1c24517d9e498f03e1da4ea8aef302c3be9.tar.gz textadept-96e9c1c24517d9e498f03e1da4ea8aef302c3be9.zip |
Write theme changes to ~/.textadept/theme; core/gui.lua
-rw-r--r-- | core/gui.lua | 7 |
1 files changed, 6 insertions, 1 deletions
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 |