diff options
author | 2012-07-16 20:54:49 -0400 | |
---|---|---|
committer | 2012-07-16 20:54:49 -0400 | |
commit | ab2806f57d24d2cba3ab7657ed311fb7b6d1b6a2 (patch) | |
tree | 721fed4bb815a47ba5352f163fd2ba26fa70f1c1 /core/gui.lua | |
parent | cbda4d355412b7d1132d1d8737d7a7d06ed211e9 (diff) | |
download | textadept-ab2806f57d24d2cba3ab7657ed311fb7b6d1b6a2.tar.gz textadept-ab2806f57d24d2cba3ab7657ed311fb7b6d1b6a2.zip |
Code cleanup.
Diffstat (limited to 'core/gui.lua')
-rw-r--r-- | core/gui.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/gui.lua b/core/gui.lua index cb9aa1d9..ca25402e 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -147,6 +147,7 @@ function gui.goto_file(filename, split, preferred_view, sloppy) io.open_file(filename) end +local theme_file = not NCURSES and 'theme' or 'theme_term' local THEME --- -- Sets the editor theme from the given name. @@ -162,7 +163,6 @@ function gui.set_theme(name) if not name then -- Read theme from ~/.textadept/theme or ~/.textadept/theme_term depending -- on NCURSES platform, defaulting to 'light' or 'term' respectively. - local theme_file = not NCURSES and 'theme' or 'theme_term' local f = io.open(_USERHOME..'/'..theme_file, 'rb') if f then name = f:read('*line'):match('[^\r\n]+') @@ -228,7 +228,6 @@ function gui.select_theme() if not theme then return end gui.set_theme(theme) -- Write the theme to the user's theme file. - local theme_file = not NCURSES and 'theme' or 'theme_term' local f = io.open(_USERHOME..'/'..theme_file, 'wb') if not f then return end f:write(theme) |