aboutsummaryrefslogtreecommitdiff
path: root/core/gui.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-04-03 16:56:14 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-04-03 16:56:14 -0400
commit679e188ec027978b37eb36a5f2d52bc2cf04ef77 (patch)
tree61da33e31c8f6f02fcc5fd53e406368635d5df43 /core/gui.lua
parent00153ab1c0f7307a8589c7d0cc0a3908cb7f0c34 (diff)
downloadtextadept-679e188ec027978b37eb36a5f2d52bc2cf04ef77.tar.gz
textadept-679e188ec027978b37eb36a5f2d52bc2cf04ef77.zip
Textadept should support multiple curses platforms; remove ncurses references.
Requires Scintilla r4436 and Scinterm r45.
Diffstat (limited to 'core/gui.lua')
-rw-r--r--core/gui.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/gui.lua b/core/gui.lua
index f61a45b3..e9aa763b 100644
--- a/core/gui.lua
+++ b/core/gui.lua
@@ -116,7 +116,7 @@ function gui.switch_buffer()
items[#items + 1] = filename
end
local i = gui.filteredlist(_L['Switch Buffers'], columns, items, true,
- NCURSES and {'--width', gui.size[1] - 2} or '--')
+ CURSES and {'--width', gui.size[1] - 2} or '--')
if i then view:goto_buffer(i + 1) end
end
@@ -160,7 +160,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_file = not CURSES and 'theme' or 'theme_term'
local THEME
---
-- Sets the editor theme name to *name* or the default platform theme.
@@ -176,13 +176,13 @@ local THEME
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.
+ -- on CURSES platform, defaulting to 'light' or 'term' respectively.
local f = io.open(_USERHOME..'/'..theme_file, 'rb')
if f then
name = f:read('*line'):match('[^\r\n]+')
f:close()
end
- if not name or name == '' then name = not NCURSES and 'light' or 'term' end
+ if not name or name == '' then name = not CURSES and 'light' or 'term' end
end
-- Get the path of the theme.
@@ -363,8 +363,8 @@ events_connect(events.UPDATE_UI, function()
local tabs = string_format('%s %d', buffer.use_tabs and _L['Tabs:'] or
_L['Spaces:'], buffer.tab_width)
local enc = buffer.encoding or ''
- local text = not NCURSES and '%s %d/%d %s %d %s %s %s %s' or
- '%s %d/%d %s %d %s %s %s %s'
+ local text = not CURSES and '%s %d/%d %s %d %s %s %s %s' or
+ '%s %d/%d %s %d %s %s %s %s'
gui.docstatusbar_text = string_format(text, _L['Line:'], line, max,
_L['Col:'], col, lexer, eol, tabs, enc)
end)