aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--FAQ.md12
-rw-r--r--README.md5
-rw-r--r--core/._M.luadoc8
-rw-r--r--core/args.lua2
-rw-r--r--core/file_io.lua4
-rw-r--r--core/gui.lua12
-rw-r--r--core/init.lua6
-rw-r--r--core/keys.lua18
-rw-r--r--core/locale.conf2
-rw-r--r--core/locale.lua2
-rw-r--r--core/locales/locale.es.conf2
-rw-r--r--core/locales/locale.fr.conf2
-rw-r--r--doc/01_Introduction.md4
-rw-r--r--doc/02_Installation.md20
-rw-r--r--doc/04_WorkingWithFiles.md41
-rw-r--r--doc/05_FileNavigation.md10
-rw-r--r--doc/06_AdeptEditing.md66
-rw-r--r--doc/07_Modules.md4
-rw-r--r--doc/08_Preferences.md4
-rw-r--r--doc/09_Themes.md2
-rw-r--r--doc/10_Advanced.md8
-rw-r--r--doc/12_Compiling.md31
-rw-r--r--doc/13_Help.md2
-rw-r--r--doc/14_Appendix.md14
-rw-r--r--modules/cpp/init.lua2
-rw-r--r--modules/lua/init.lua2
-rw-r--r--modules/textadept/adeptsense.lua4
-rw-r--r--modules/textadept/bookmarks.lua6
-rw-r--r--modules/textadept/command_entry.lua2
-rw-r--r--modules/textadept/editing.lua10
-rw-r--r--modules/textadept/find.lua22
-rw-r--r--modules/textadept/keys.lua175
-rw-r--r--modules/textadept/menu.lua6
-rw-r--r--modules/textadept/session.lua6
-rw-r--r--modules/textadept/snippets.lua2
-rw-r--r--src/Makefile90
-rw-r--r--src/textadept.c106
37 files changed, 358 insertions, 356 deletions
diff --git a/FAQ.md b/FAQ.md
index 7de0e65f..4062267f 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -28,8 +28,8 @@ example, "libpng14" has been available for many distributions since late 2009
while the latest 2012 Ubuntu still uses "libpng12". Unfortunately in these
cases, the best idea is to compile Textadept. This process is actually very
simple though. See the [compiling][] page. Only the GTK+ development libraries
-are needed for the GUI version. (The ncurses development library is required for
-the terminal version.)
+are needed for the GUI version. (A development library for a curses
+implementation is required for the terminal version.)
[compiling]: 12_Compiling.html
@@ -84,7 +84,7 @@ Take a look at these [comments][].
- - -
**Q:**
-The ncurses version does not support feature _x_ the GUI version does. Is this a
+The curses version does not support feature _x_ the GUI version does. Is this a
bug?
**A:**
@@ -94,17 +94,17 @@ for making selections. Linux's virtual terminals (the ones accessible with
seem to work fine. rxvt and rxvt-unicode do not work out of the box, but may be
configurable.
-Please see the [ncurses compatibility][] section of the appendix. If the feature
+Please see the [curses compatibility][] section of the appendix. If the feature
in question is not listed there, it may be a bug. Please [contact][] me with any
bug reports.
-[ncurses compatibility]: 14_Appendix.html#Ncurses.Compatibility
+[curses compatibility]: 14_Appendix.html#Curses.Compatibility
[contact]: README.html#Contact
- - -
**Q:**
-Pressing `^O` in the ncurses version on Mac OSX does not do anything. Why?
+Pressing `^O` in the curses version on Mac OSX does not do anything. Why?
**A:**
For whatever reason, `^O` is discarded by the terminal driver. To enable it, run
diff --git a/README.md b/README.md
index c46bfd3a..bdf41ddb 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ speed or succumbing to code bloat and featuritis.
* Powerful snippets and key commands.
* Code autocompletion and API lookup.
* Unparalleled extensibility.
-* Terminal (ncurses) version.
+* Terminal (curses) version.
## Requirements
@@ -28,7 +28,8 @@ operating systems and depends only on [GTK+ 2.0][] version 2.18 or greater on
Linux. Lua is pre-compiled into Textadept on all platforms and a GTK+ runtime is
included on Windows and Mac OSX.
-The terminal version of Textadept requires only [ncurses][].
+The terminal version of Textadept requires only an implementation of curses like
+[ncurses][].
[GTK+ 2.0]: http://gtk.org
[ncurses]: http://invisible-island.net/ncurses/ncurses.html
diff --git a/core/._M.luadoc b/core/._M.luadoc
index a5bce5f1..f2e02abe 100644
--- a/core/._M.luadoc
+++ b/core/._M.luadoc
@@ -27,7 +27,7 @@
--
-- #### Block Comment
--
--- The `Ctrl+/` (`⌘/` on Mac OSX | `M-/` in ncurses) key binding toggles code
+-- The `Ctrl+/` (`⌘/` on Mac OSX | `M-/` in curses) key binding toggles code
-- comments. In order for this to work for your language, the
-- [`_M.textadept.editing.comment_string`][] table must have a key with the
-- language's lexer name assigned to a comment prefix string. For Lua, it would
@@ -40,7 +40,7 @@
-- #### Compile and Run
--
-- The `Ctrl+Shift+R` and `Ctrl+R` (`⌘⇧R` and `⌘R` on Mac OSX | `M-^R` and `^R`
--- in ncurses) key bindings compile and run code, respectively. In order for
+-- in curses) key bindings compile and run code, respectively. In order for
-- these to work for your language, the [`_M.textadept.run.compile_command`][]
-- and [`_M.textadept.run.run_command`][] tables must have keys with the
-- language's lexer name assigned to compile and run shell commands,
@@ -81,7 +81,7 @@
-- #### Adeptsense
--
-- The `Ctrl+Space` and `Ctrl+H` (`⌥⎋` and `^H` on Mac OSX | `^Space` and `M-H`
--- or `M-S-H` in ncurses) key bindings autocomplete symbols and show API
+-- or `M-S-H` in curses) key bindings autocomplete symbols and show API
-- documentation, respectively, when editing code. In order for these to work
-- for your language, you must create an [Adeptsense][].
--
@@ -107,7 +107,7 @@
-- [Lua][] module has a feature to autocomplete the `end` keyword in a control
-- structure and the [C/C++][] module has a feature to add a ';' to the end of
-- the current line and insert a new line. Both are bound to the `Shift+Enter`
--- (`⇧↩` on Mac OSX | `S-Enter` in ncurses) key for easy access.
+-- (`⇧↩` on Mac OSX | `S-Enter` in curses) key for easy access.
--
-- function M.try_to_autocomplete_end()
-- ...
diff --git a/core/args.lua b/core/args.lua
index b94cc645..dedfc22e 100644
--- a/core/args.lua
+++ b/core/args.lua
@@ -77,7 +77,7 @@ local function show_help()
for k, v in pairs(switches) do print(line:format(k, table.unpack(v, 2))) end
os.exit()
end
-if not NCURSES then M.register('-h', '--help', 0, show_help, 'Shows this') end
+if not CURSES then M.register('-h', '--help', 0, show_help, 'Shows this') end
-- For Windows, create arg table from single command line string (arg[0]).
if WIN32 and #arg[0] > 0 then
diff --git a/core/file_io.lua b/core/file_io.lua
index 878188ed..7ccf7605 100644
--- a/core/file_io.lua
+++ b/core/file_io.lua
@@ -396,7 +396,7 @@ end)
-- @name open_recent_file
function io.open_recent_file()
local i = gui.filteredlist(_L['Open'], _L['File'], io.recent_files, true,
- NCURSES and {'--width', gui.size[1] - 2} or '')
+ CURSES and {'--width', gui.size[1] - 2} or '')
if i then io.open_file(io.recent_files[i + 1]) end
end
@@ -445,7 +445,7 @@ function io.snapopen(utf8_paths, filter, exclude_FILTER, ...)
io.SNAPOPEN_MAX),
'--button1', _L['_OK'])
end
- local width = NCURSES and {'--width', gui.size[1] - 2} or ''
+ local width = CURSES and {'--width', gui.size[1] - 2} or ''
io.open_file(gui.filteredlist(_L['Open'], _L['File'], list, false,
'--select-multiple', width, ...) or '')
end
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)
diff --git a/core/init.lua b/core/init.lua
index cc94e618..ea7efb81 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -49,11 +49,11 @@ _M = {} -- modules table
-- If Textadept is running on Windows, this flag is `true`.
-- @field OSX (bool)
-- If Textadept is running on Mac OSX, this flag is `true`.
--- @field NCURSES (bool)
+-- @field CURSES (bool)
-- If Textadept is running in the terminal, this flag is `true`.
--- ncurses feature incompatibilities are listed in the [Appendix][].
+-- Curses feature incompatibilities are listed in the [Appendix][].
--
--- [Appendix]: ../14_Appendix.html#Ncurses.Compatibility
+-- [Appendix]: ../14_Appendix.html#Curses.Compatibility
module('_G')]]
--[[ The tables below were defined in C.
diff --git a/core/keys.lua b/core/keys.lua
index 5894acfa..5d599482 100644
--- a/core/keys.lua
+++ b/core/keys.lua
@@ -26,7 +26,7 @@ local M = {}
--
-- Key sequences are strings built from a combination of modifier keys and the
-- key itself. Modifier keys are "Control", "Shift", and "Alt" on Windows,
--- Linux, BSD, and in ncurses. On Mac OSX they are "Command" (`⌘`), "Alt/Option"
+-- Linux, BSD, and in curses. On Mac OSX they are "Command" (`⌘`), "Alt/Option"
-- (`⌥`), "Control" (`^`), and "Shift" (`⇧`). These modifiers have the following
-- string representations:
--
@@ -69,7 +69,7 @@ local M = {}
-- Key chains are a powerful concept. They allow multiple key bindings to be
-- assigned to one key sequence. Language-specific modules
-- [use key chains](#LANGUAGE_MODULE_PREFIX) for their functions. By default,
--- the `Esc` (`⎋` on Mac OSX | `Esc` in ncurses) key cancels a key chain, but it
+-- the `Esc` (`⎋` on Mac OSX | `Esc` in curses) key cancels a key chain, but it
-- can be redefined via [`CLEAR`](#CLEAR). An example key chain looks like:
--
-- keys['aa'] = {
@@ -81,18 +81,18 @@ local M = {}
-- The string representing the key sequence that clears the current key chain.
-- It cannot be part of a key chain.
-- The default value is `'esc'` for the `Esc` (`⎋` on Mac OSX | `Esc` in
--- ncurses) key.
+-- curses) key.
-- @field LANGUAGE_MODULE_PREFIX (string)
-- The starting key of the key chain reserved for language-specific modules.
-- The default value is `'cl'` on platforms other than Mac OSX, `'ml'`
--- otherwise. Equivalent to `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in ncurses).
+-- otherwise. Equivalent to `Ctrl+L` (`⌘L` on Mac OSX | `M-L` in curses).
module('keys')]]
local ADD = ''
local CTRL, ALT, META, SHIFT = 'c'..ADD, 'a'..ADD, 'm'..ADD, 's'..ADD
-if NCURSES then ALT = META end
+if CURSES then ALT = META end
M.CLEAR = 'esc'
-M.LANGUAGE_MODULE_PREFIX = (not OSX and not NCURSES and CTRL or META)..'l'
+M.LANGUAGE_MODULE_PREFIX = (not OSX and not CURSES and CTRL or META)..'l'
-- Optimize for speed.
local OSX = OSX
@@ -113,7 +113,7 @@ local error = function(e) events.emit(events.ERROR, e) end
M.KEYSYMS = {
-- From Scintilla.h and cdk/curdefs.h.
[7] = 'esc', [8] = '\b', [9] = '\t', [13] = '\n', [27] = 'esc',
- -- From ncurses.h.
+ -- From curses.h.
[263] = '\b',
-- From Scintilla.h.
[300] = 'down', [301] = 'up', [302] = 'left', [303] = 'right',
@@ -226,7 +226,7 @@ local function keypress(code, shift, control, alt, meta)
local key
--print(code, M.KEYSYMS[code], shift, control, alt, meta)
if code < 256 then
- key = (not NCURSES or code ~= 7) and string_char(code) or M.KEYSYMS[code]
+ key = (not CURSES or code ~= 7) and string_char(code) or M.KEYSYMS[code]
shift = shift and code < 32 -- for printable characters, key is upper case
else
key = M.KEYSYMS[code]
@@ -237,7 +237,7 @@ local function keypress(code, shift, control, alt, meta)
--print(key_seq)
gui.statusbar_text = ''
- --if NCURSES then gui.statusbar_text = '"'..key_seq..'"' end
+ --if CURSES then gui.statusbar_text = '"'..key_seq..'"' end
if #keychain > 0 and key_seq == M.CLEAR then
clear_key_sequence()
return true
diff --git a/core/locale.conf b/core/locale.conf
index f694e806..ac7aa15f 100644
--- a/core/locale.conf
+++ b/core/locale.conf
@@ -90,7 +90,7 @@ An error occured: = An error occured:
%_OK = _OK
%_Cancel = _Cancel
replacement(s) made = replacement(s) made
-% For ncurses:
+% For curses:
%Find: = Find:
Replace: = Replace:
[Next] = [Next]
diff --git a/core/locale.lua b/core/locale.lua
index e888df22..a42b15f7 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -29,7 +29,7 @@ if not f then error('"core/locale.conf" not found.') end
for line in f:lines() do
if not line:find('^%s*%%') then
local id, str = line:match('^(.-)%s*=%s*(.+)$')
- if id and str then M[id] = not NCURSES and str or str:gsub('_', '') end
+ if id and str then M[id] = not CURSES and str or str:gsub('_', '') end
end
end
f:close()
diff --git a/core/locales/locale.es.conf b/core/locales/locale.es.conf
index 4ebf1152..3fcad09f 100644
--- a/core/locales/locale.es.conf
+++ b/core/locales/locale.es.conf
@@ -91,7 +91,7 @@ An error occured: = Ha ocurrido un error:
%_OK = _Aceptar
%_Cancel = _Cancelar
replacement(s) made = cambios(s) hecho(s)
-% For ncurses:
+% For curses:
%Find: = Buscar:
Replace: = Reemplazar:
[Next] = [Siguiente]
diff --git a/core/locales/locale.fr.conf b/core/locales/locale.fr.conf
index 907cf735..b93d6eaa 100644
--- a/core/locales/locale.fr.conf
+++ b/core/locales/locale.fr.conf
@@ -91,7 +91,7 @@ An error occured: = Une erreur est survenue:
%_OK = _OK
%_Cancel = _Annuler
replacement(s) made = remplacement(s) effectués
-% For ncurses:
+% For curses:
%Find: = Rechercher:
Replace: = Remplacer:
[Next] = [Suivant]
diff --git a/doc/01_Introduction.md b/doc/01_Introduction.md
index 2c98e04f..ac577111 100644
--- a/doc/01_Introduction.md
+++ b/doc/01_Introduction.md
@@ -62,8 +62,8 @@ is applicable to key chains: `Ctrl+N, N` vs. `Ctrl+N, Shift+N`. In the first key
chain, "Control" and "N" are pressed followed by "N" with no modifiers. The
second has "Control" and "N" pressed followed by "Shift" and "N".
-When key bindings are mentioned, the Mac OSX and ncurses equivalents are often
+When key bindings are mentioned, the Mac OSX and curses equivalents are often
shown in parenthesis. It may be tempting to assume that some Windows/Linux keys
-map to Mac OSX's (e.g. `Ctrl` to `⌘`) or ncurses' (e.g. `Ctrl` to `^`), but this
+map to Mac OSX's (e.g. `Ctrl` to `⌘`) or curses' (e.g. `Ctrl` to `^`), but this
is not always the case. Please do not view the key equivalents as translations
of one another, but rather as separate entities. This will minimize confusion.
diff --git a/doc/02_Installation.md b/doc/02_Installation.md
index c4d1cabc..81980721 100644
--- a/doc/02_Installation.md
+++ b/doc/02_Installation.md
@@ -6,8 +6,9 @@ In its bid for minimalism, Textadept also needs very little to run. The GUI
version needs only [GTK+][], a cross-platform GUI toolkit, version 2.18 or later
on Linux and BSD systems. A GTK+ runtime is already bundled into the Windows
and Mac OSX packages. Textadept also has its own [copy of Lua][]. The terminal
-(ncurses) version of Textadept requires [ncurses][], but that dependency is only
-necessary if you wish to run the editor from a terminal.
+(curses) version of Textadept requires a curses implementation like [ncurses][],
+but that dependency is only necessary if you wish to run the editor from a
+terminal.
[GTK+]: http://gtk.org
[copy of Lua]: 11_Scripting.html#Lua.Configuration
@@ -25,11 +26,12 @@ can compile Textadept with earlier versions of GLib down to 2.22. For reference,
Ubuntu 11.04, Debian Wheezy, Fedora 15, and openSUSE 11.4 support GLib 2.28 or
later.
-Most Linux and BSD systems already have ncurses installed. If not, look for it
-in your package manager, or compile and install it from the [ncurses website][].
-You need to have or compile the wide-character version of ncurses, which handles
-multibyte characters. For Debian-based distributions like Ubuntu, the package is
-typically called "libncursesw5".
+Most Linux and BSD systems already have a curses implementation like ncurses
+installed. If not, look for one in your package manager, or compile and install
+ncurses from the [ncurses website][]. You need to have or compile the
+wide-character version of ncurses, which handles multibyte characters. For
+Debian-based distributions like Ubuntu, the package is typically called
+"libncursesw5".
[GTK+ website]: http://www.gtk.org/download-linux.html
[ncurses website]: http://invisible-island.net/ncurses/#download_ncurses
@@ -103,7 +105,7 @@ There is also a *textadeptjit* executable for running Textadept with [LuaJIT][].
Please note there may be [compatibility issues][]. The *textadept* executable is
recommended.
-The *textadept-ncurses* and *textadeptjit-ncurses* executables are versions of
+The *textadept-curses* and *textadeptjit-curses* executables are versions of
Textadept for the terminal. Run them as you would run the *textadept* and
*textadeptjit* executables, but from a terminal instead.
@@ -192,5 +194,5 @@ Textadept.
&nbsp;&nbsp;
![Win32](images/win32.png)
&nbsp;&nbsp;
-![ncurses](images/ncurses.png)
+![curses](images/ncurses.png)
</span>
diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md
index 04b4726c..0f8cfd11 100644
--- a/doc/04_WorkingWithFiles.md
+++ b/doc/04_WorkingWithFiles.md
@@ -9,7 +9,7 @@ single tab bar for multiple views would cause confusion and having one tab bar
per view would clutter the interface.
Instead of having tabs, Textadept has the buffer browser. Press `Ctrl+B` (`⌘B`
-on Mac OSX | `M-B` or `M-S-B` in ncurses) to open it.
+on Mac OSX | `M-B` or `M-S-B` in curses) to open it.
![Buffer Browser](images/bufferbrowser.png)
@@ -21,7 +21,7 @@ wildcards. You can also just use the arrow keys. Pressing `Enter` or selecting
![Buffer Browser Filtered](images/bufferbrowserfiltered.png)
You can see which buffer is active by looking at Textadept's titlebar. Pressing
-`Ctrl+Tab` (`^⇥` on Mac OSX | `M-N` in ncurses) cycles to the next buffer and
+`Ctrl+Tab` (`^⇥` on Mac OSX | `M-N` in curses) cycles to the next buffer and
`Ctrl+Shift+Tab` (`^⇧⇥` | `M-P`) cycles to the previous one.
### Settings
@@ -39,7 +39,7 @@ settings in the buffer status statusbar.
Indentation is usually set by a [language-specific module][] or the current
[theme][]. By default, indentation is 2 spaces. You can toggle between using
tabs and spaces manually by pressing `Ctrl+Alt+Shift+T` (`^⇧T` on Mac OSX |
-`M-T` or `M-S-T` in ncurses). Toggling between tabs and spaces only affects
+`M-T` or `M-S-T` in curses). Toggling between tabs and spaces only affects
future indentation; it does not convert existing indentation. `Ctrl+Alt+I` (`^I`
| `M-I`) performs the conversion. (If the buffer is using tabs, all indenting
spaces are converted to tabs. If the buffer is using spaces, all indenting tabs
@@ -78,7 +78,7 @@ alter the encoding of existing files.
### Recent Files
-Pressing `Ctrl+Alt+O` (`^⌘O` on Mac OSX | `M-^O` in ncurses) brings up a dialog
+Pressing `Ctrl+Alt+O` (`^⌘O` on Mac OSX | `M-^O` in curses) brings up a dialog
that behaves like the buffer browser, but displays a list of recently opened
files to reopen.
@@ -100,7 +100,7 @@ A quicker, though slightly more limited alternative to the standard file
selection dialog is snapopen. It behaves like the buffer browser, but displays a
list of files to open, including files in sub-directories. You can snapopen the
current file's directory with `Ctrl+Alt+Shift+O` (`^⌘⇧O` on Mac OSX | `M-S-O` in
-ncurses) or from the "Tools -> Snapopen -> Current Directory" menu. Snapopen is
+curses) or from the "Tools -> Snapopen -> Current Directory" menu. Snapopen is
pretty limited from the menu, but more versatile in [scripts][]. `Ctrl+U` (`⌘U`
| `^U`) snaps open *~/.textadept/*.
@@ -115,20 +115,20 @@ pretty limited from the menu, but more versatile in [scripts][]. `Ctrl+U` (`⌘U
Textadept allows you to split the editor window as many times as you like both
horizontally and vertically. `Ctrl+Alt+S` or `Ctrl+Alt+H` splits horizontally
into top and bottom views and `Ctrl+Alt+V` splits vertically (`^S` and `^V`
-respectively on Mac OSX | N/A in ncurses) into side-by-side views. You can
-resize the splitter bar by clicking and dragging with the mouse or using
-`Ctrl+Alt++` and `Ctrl+Alt+-` (`^+` and `^-` | N/A). The same file can be opened
-in multiple views.
+respectively on Mac OSX | N/A in curses) into side-by-side views. You can resize
+the splitter bar by clicking and dragging with the mouse or using `Ctrl+Alt++`
+and `Ctrl+Alt+-` (`^+` and `^-` | N/A). The same file can be opened in multiple
+views.
-Pressing `Ctrl+Alt+N` (`^⌥⇥` on Mac OSX | N/A in ncurses) goes to the next view
+Pressing `Ctrl+Alt+N` (`^⌥⇥` on Mac OSX | N/A in curses) goes to the next view
and `Ctrl+Alt+P` (`^⌥⇧⇥` | N/A) goes to the previous one. Note: depending on the
split sequence, the order when cycling between views may be unexpected.
To unsplit a view, enter the view to keep open and press `Ctrl+Alt+W` (`^W` on
-Mac OSX | N/A in ncurses). To unsplit all views, use `Ctrl+Alt+Shift+W` (`^⇧W` |
+Mac OSX | N/A in curses). To unsplit all views, use `Ctrl+Alt+Shift+W` (`^⇧W` |
N/A).
-Split views are unavailable in ncurses.
+Split views are unavailable in curses.
### Settings
@@ -141,33 +141,32 @@ any other split view. It will have to be done manually.
#### Line Endings
Normally, EOL characters ("\r" and "\n") are invisible. Pressing
-`Ctrl+Alt+Enter` (`^↩` on Mac OSX | none in ncurses) toggles their visibility.
+`Ctrl+Alt+Enter` (`^↩` on Mac OSX | none in curses) toggles their visibility.
#### Long Lines
By default, lines with more characters than the view can show are not wrapped
-into view. `Ctrl+Alt+\` (`^\` on Mac OSX | none in ncurses) toggles line
+into view. `Ctrl+Alt+\` (`^\` on Mac OSX | none in curses) toggles line
wrapping.
#### Indentation Guides
By default, small guiding lines are shown based on indentation level.
-`Ctrl+Alt+Shift+I` (`^⇧I` on Mac OSX | N/A in ncurses) toggles showing these
+`Ctrl+Alt+Shift+I` (`^⇧I` on Mac OSX | N/A in curses) toggles showing these
guides.
-Indentation guides are unavailable in ncurses.
+Indentation guides are unavailable in curses.
#### Whitespace
Normally, whitespace characters, tabs and spaces, are invisible. Pressing
-`Ctrl+Alt+Shift+S` (`^⇧S` on Mac OSX | none in ncurses) toggles their
-visibility. Visible spaces are shown as dots and visible tabs are shown as
-arrows.
+`Ctrl+Alt+Shift+S` (`^⇧S` on Mac OSX | none in curses) toggles their visibility.
+Visible spaces are shown as dots and visible tabs are shown as arrows.
### Zoom
You can temporarily increase or decrease the font size in a view with `Ctrl+=`
-(`⌘=` on Mac OSX | N/A in ncurses) and `Ctrl+-` (`⌘-` | N/A) respectively.
+(`⌘=` on Mac OSX | N/A in curses) and `Ctrl+-` (`⌘-` | N/A) respectively.
`Ctrl+0` (`⌘0` | N/A) resets the zoom.
-Zooming is unavailable in ncurses.
+Zooming is unavailable in curses.
diff --git a/doc/05_FileNavigation.md b/doc/05_FileNavigation.md
index 4e21f8fb..4c543e87 100644
--- a/doc/05_FileNavigation.md
+++ b/doc/05_FileNavigation.md
@@ -5,8 +5,8 @@
Textadept supports the key bindings you are accustomed to for navigating text
fields on your platform. The arrow keys move the caret in a particular
direction, `Ctrl+Left` and `Ctrl+Right` (`^⇠` and `^⇢` on Mac OSX | `^Left` and
-`^Right` in ncurses) move by words, `PgUp` and `PgDn` (`⇞` and `⇟` | `PgUp` and
-`PgDn`) move by pages, etc. Mac OSX and ncurses also support some Bash-style
+`^Right` in curses) move by words, `PgUp` and `PgDn` (`⇞` and `⇟` | `PgUp` and
+`PgDn`) move by pages, etc. Mac OSX and curses also support some Bash-style
bindings like `^B`, `^F`, `^P`, `^N`, `^A`, and `^E`. A complete list of
movement bindings is found in the "Movement" section of the
[key bindings list][].
@@ -17,14 +17,14 @@ movement bindings is found in the "Movement" section of the
By default, Textadept will highlight the matching brace characters under the
caret : '(', ')', '[', ']', '{', and '}'. Pressing `Ctrl+M` (`^M` on Mac OSX |
-`M-M` in ncurses) moves the caret to that matching brace.
+`M-M` in curses) moves the caret to that matching brace.
![Matching Braces](images/matchingbrace.png)
## Bookmarks
You can place bookmarks on lines in buffers to jump back to them later.
-`Ctrl+F2` (`⌘F2` on Mac OSX | `F1` in ncurses) toggles a bookmark on the current
+`Ctrl+F2` (`⌘F2` on Mac OSX | `F1` in curses) toggles a bookmark on the current
line, `F2` jumps to the next bookmarked line, `Shift+F2` (`⇧F2` | `F3`) jumps to
the previously bookmarked line, `Alt+F2` (`⌥F2` | `F4`) jumps to the bookmark
selected from a list, and `Ctrl+Shift+F2` (`⌘⇧F2` | `F6`) clears all bookmarks
@@ -33,5 +33,5 @@ in the current buffer.
## Goto Line
To jump to a specific line in a file, press `Ctrl+J` (`⌘J` on Mac OSX | `^J` in
-ncurses) and specify the line number in the prompt and press `Enter` (`↩` |
+curses) and specify the line number in the prompt and press `Enter` (`↩` |
`Enter`) or select `OK`.
diff --git a/doc/06_AdeptEditing.md b/doc/06_AdeptEditing.md
index 1ea88ad4..78b3bffc 100644
--- a/doc/06_AdeptEditing.md
+++ b/doc/06_AdeptEditing.md
@@ -14,7 +14,7 @@ below.
Usually, quote ('&apos;', '&quot;') and brace ('(', '[', '{') characters go
together in pairs. By default, Textadept automatically inserts the complement
character when the first is typed. Similarly, the complement is deleted when you
-press `Bksp` (`⌫` on Mac OSX | `Bksp` in ncurses) over the first. Typing over
+press `Bksp` (`⌫` on Mac OSX | `Bksp` in curses) over the first. Typing over
complement characters is also supported. See the [preferences][] page if you
would like to disable these features.
@@ -23,7 +23,7 @@ would like to disable these features.
### Word Completion
Textadept provides buffer-based word completion. Start typing a word, press
-`Ctrl+Enter` (`^⎋` on Mac OSX | `M-Enter` in ncurses), and a list of suggested
+`Ctrl+Enter` (`^⎋` on Mac OSX | `M-Enter` in curses), and a list of suggested
completions based on words in the current buffer is provided. Continuing to type
changes the suggestion. Press `Enter` (`↩` | `Enter`) to complete the selected
word.
@@ -33,7 +33,7 @@ word.
### Virtual Space Mode
Virtual space (freehand) mode is enabled and disabled with `Ctrl+Alt+Shift+V`
-(`^⇧V` in Mac OSX | none in ncurses). When enabled, caret movement is not
+(`^⇧V` in Mac OSX | none in curses). When enabled, caret movement is not
restricted by line endings.
### Overwrite Mode
@@ -58,11 +58,11 @@ key places an additional caret at that point. Clicking and dragging while
holding the same modifier creates multiple selections. When you start typing,
the text is mirrored at each selection.
-Creating multiple selections with the mouse is currently unavailable in ncurses.
+Creating multiple selections with the mouse is currently unavailable in curses.
### Rectangular Selection
-Holding `Alt+Shift` (`⌥⇧` on Mac OSX | `M-S-` in ncurses) and pressing the arrow
+Holding `Alt+Shift` (`⌥⇧` on Mac OSX | `M-S-` in curses) and pressing the arrow
keys enables rectangular selections to be made. Start typing to type on each
line. You can also hold the "Alt" modifier key ("Super" on Linux) while clicking
and dragging the mouse to create rectangular selections.
@@ -79,7 +79,7 @@ change [`buffer.rectangular_selection_modifier`][] in your [theme][]. The
to be reconfigured too.
Creating rectangular selections with the mouse is currently unavailable in
-ncurses.
+curses.
[`buffer.rectangular_selection_modifier`]: api/buffer.html#rectangular_selection_modifier
[theme]: 09_Themes.html#View
@@ -87,20 +87,20 @@ ncurses.
### Select to Matching Brace
Putting the caret over a brace character ('(', ')', '[', ']', '{', or '}') and
-pressing `Ctrl+Shift+M` (`^⇧M` on Mac OSX| `M-S-M` in ncurses) extends the
+pressing `Ctrl+Shift+M` (`^⇧M` on Mac OSX| `M-S-M` in curses) extends the
selection to the brace character's matching brace.
### Entity Selection
Textadept allows you to select many different entities from the caret. For
-example, `Ctrl+"` (`^"` on Mac OSX | `M-"` in ncurses) selects all characters in
+example, `Ctrl+"` (`^"` on Mac OSX | `M-"` in curses) selects all characters in
a double-quoted range. Typing `Ctrl++` (`^+` | `M-+`) as a follow-up selects the
double-quotes too. See the "Edit -> Select In..." menu for available entities
and their key bindings.
### Marks
-In ncurses, since some terminals do not recognize certain key combinations like
+In curses, since some terminals do not recognize certain key combinations like
`Shift+Arrow` for making selections, you can use marks to create selections.
Create a mark at the current caret position with `^^`. Then use regular movement
keys like the arrows, page up/down, and home/end to extend the selection in one
@@ -110,7 +110,7 @@ type text, delete text, or run a command that does either, the mark is removed
and ordinary navigation is restored. You can also press `^^` again to stop
selecting text.
-Marks are only supported in ncurses.
+Marks are only supported in curses.
### Transforms
@@ -121,19 +121,19 @@ As a complement to selecting entities, you can enclose text as entities. The
their key bindings.
If no text is selected, the word to the left of the caret is enclosed. For
-example, pressing `Alt+<` (`^<` on Mac OSX | `M->` in ncurses) at the end of a
+example, pressing `Alt+<` (`^<` on Mac OSX | `M->` in curses) at the end of a
word encloses it in XML tags.
#### Change Case
Pressing `Ctrl+Alt+U` or `Ctrl+Alt+Shift+U` (`^U` or `^⇧U` on Mac OSX | `M-^U`
-or `M-^L` in ncurses) converts selected text to upper case letters or lower case
+or `M-^L` in curses) converts selected text to upper case letters or lower case
letters respectively.
#### Change Indent Level
The amount of indentation for a selected set of lines is increased by pressing
-`Tab` (`⇥` on Mac OSX | `Tab` in ncurses) and decreased by pressing `Shift+Tab`
+`Tab` (`⇥` on Mac OSX | `Tab` in curses) and decreased by pressing `Shift+Tab`
(`⇧⇥` | `S-Tab`). Whole lines do not have to be selected. As long as any part of
a line is selected, the entire line is eligible for indenting/dedenting. Using
these key sequences when no selection is present does not have the same effect.
@@ -141,13 +141,13 @@ these key sequences when no selection is present does not have the same effect.
#### Move Lines
Selected lines are moved with the `Ctrl+Shift+Up` and `Ctrl+Shift+Down` (`^⇧⇡`
-and `^⇧⇣` on Mac OSX | `S-^Up` and `S-^Down` in ncurses) keys. Like with
-changing indent level, as long as any part of a line is selected, the entire
-line is eligible for moving.
+and `^⇧⇣` on Mac OSX | `S-^Up` and `S-^Down` in curses) keys. Like with changing
+indent level, as long as any part of a line is selected, the entire line is
+eligible for moving.
## Find & Replace
-`Ctrl+F` (`⌘F` on Mac OSX | `M-F` or `M-S-F` in ncurses) brings up the Find &
+`Ctrl+F` (`⌘F` on Mac OSX | `M-F` or `M-S-F` in curses) brings up the Find &
Replace pane. In addition to offering the usual find and replace with "Match
Case" and "Whole Word" options and find/replace history, Textadept allows you to
find with [Lua patterns][] and replace with Lua captures and even Lua code! For
@@ -157,12 +157,12 @@ pattern search, but embedded Lua code enclosed in `%()` is always allowed.
Note the `Ctrl+G`, `Ctrl+Shift+G`, `Ctrl+Alt+R`, `Ctrl+Alt+Shift+R` key bindings
for find next, find previous, replace, and replace all (`⌘G`, `⌘⇧G`, `^R`, `^⇧R`
-respectively on Mac OSX | `M-G`, `M-S-G`, `M-R`, `M-S-R` in ncurses) only work
+respectively on Mac OSX | `M-G`, `M-S-G`, `M-R`, `M-S-R` in curses) only work
when the Find & Replace pane is hidden. When the pane is visible in the GUI
version, use the button mnemonics: `Alt+N`, `Alt+P`, `Alt+R`, and `Alt+A` (`⌘N`,
`⌘P`, `⌘R`, `⌘A` | N/A) for English locale.
-In the ncurses version, `Tab` and `S-Tab` toggles between the find next, find
+In the curses version, `Tab` and `S-Tab` toggles between the find next, find
previous, replace, and replace all buttons; `Up` and `Down` arrows switch
between the find and replace text fields; `^P` and `^N` cycles through history;
and `F1-F4` toggles find options.
@@ -179,11 +179,11 @@ then "Replace All".
### Find in Files
-`Ctrl+Shift+F` brings up Find in Files (`⌘⇧F` on Mac OSX | none in ncurses) and
+`Ctrl+Shift+F` brings up Find in Files (`⌘⇧F` on Mac OSX | none in curses) and
will prompt for a directory to search. The results are displayed in a new
buffer. Double-clicking a search result jumps to it in the file. You can also
use the `Ctrl+Alt+G` and `Ctrl+Alt+Shift+G` (`^⌘G` and `^⌘⇧G` on Mac OSX | none
-in ncurses) key bindings. Replace in Files is not supported. You will have to
+in curses) key bindings. Replace in Files is not supported. You will have to
"Find in Files" first, and then "Replace All" for each file a result is found
in. The "Match Case", "Whole Word", and "Lua pattern" flags still apply.
@@ -204,7 +204,7 @@ time consuming and frustrating, so using a specialized, external tool such as
### Incremental Find
You can start an incremental search by pressing `Ctrl+Alt+F` (`^⌘F` on Mac OSX |
-`M-^F` in ncurses). Incremental search searches the buffer as you type. Only the
+`M-^F` in curses). Incremental search searches the buffer as you type. Only the
"Match Case" option is recognized. Pressing `Esc` (`⎋` | `Esc`) stops the
search.
@@ -220,8 +220,8 @@ this knowledge to make viewing and editing code faster and easier.
When you open a file, chances are that Textadept will identify the programming
language associated with that file and set a "lexer" to highlight syntactic
elements of the code. You can set or change the lexer manually by pressing
-`Ctrl+Shift+L` (`⌘⇧L` on Mac OSX | `M-S-L` in ncurses) and selecting a lexer
-from the list. You can customize how Textadept recognizes files in your
+`Ctrl+Shift+L` (`⌘⇧L` on Mac OSX | `M-S-L` in curses) and selecting a lexer from
+the list. You can customize how Textadept recognizes files in your
[file type preferences][].
Lexers can sometimes lose track of their context while you are editing and
@@ -234,27 +234,27 @@ highlight syntax incorrectly. Pressing `F5` triggers a full redraw.
Some lexers support "code folding", where blocks of code can be temporarily
hidden, making viewing easier. Fold points are denoted by arrows in the margin
to the left of the code. Clicking on one toggles the folding for that block of
-code. You can also press `Ctrl+*` (`⌘*` on Mac OSX | `M-*` in ncurses) to
-toggle the fold point on the current line.
+code. You can also press `Ctrl+*` (`⌘*` on Mac OSX | `M-*` in curses) to toggle
+the fold point on the current line.
![Folding](images/folding.png)
### Word Highlight
All occurrences of a given word are highlighted by putting the caret over the
-word and pressing `Ctrl+Alt+Shift+H` (`⌘⇧H` on Mac OSX | N/A in ncurses). This
-is useful to show occurrences of a variable name, but is not limited to source
+word and pressing `Ctrl+Alt+Shift+H` (`⌘⇧H` on Mac OSX | N/A in curses). This is
+useful to show occurrences of a variable name, but is not limited to source
code.
![Word Highlight](images/wordhighlight.png)
-This is not supported in ncurses.
+This is not supported in curses.
### Adeptsense
Textadept has the capability to autocomplete symbols for programming languages
and display API documentation. Symbol completion is available by pressing
-`Ctrl+Space` (`⌥⎋` on Mac OSX | `^Space` in ncurses). Documentation for symbols
+`Ctrl+Space` (`⌥⎋` on Mac OSX | `^Space` in curses). Documentation for symbols
is available with `Ctrl+H` (`^H` | `M-H` or `M-S-H`). Note: In order for this
feature to work, the language you are working with must have an [Adeptsense][]
defined. [Language-specific modules][] usually [define Adeptsenses][]. All of
@@ -278,7 +278,7 @@ snippets are not limited to static text. They can be dynamic templates which
contain placeholders for further user input, can mirror or transform those user
inputs, and/or execute arbitrary code. Snippets are useful for rapidly
constructing blocks of code such as control structures, method calls, and
-function declarations. Press `Ctrl+K` (`⌥⇥` on Mac OSX | `M-K` in ncurses) for a
+function declarations. Press `Ctrl+K` (`⌥⇥` on Mac OSX | `M-K` in curses) for a
list of available snippets. Snippets are composed of trigger word and snippet
text. Instead of manually selecting a snippet, you can type its trigger word
followed by the `Tab` (`⇥` | `Tab`) key. Subsequent presses of `Tab` (`⇥` |
@@ -298,8 +298,8 @@ own custom snippets in your [snippet preferences][].
### Toggle Comments
-Pressing `Ctrl+/` (`⌘/` on Mac OSX | `M-/` in ncurses) comments or uncomments
-the code on the selected lines. As long as any part of a line is selected, the
+Pressing `Ctrl+/` (`⌘/` on Mac OSX | `M-/` in curses) comments or uncomments the
+code on the selected lines. As long as any part of a line is selected, the
entire line will be commented or uncommented. Note: In order for this feature to
work, the language you are working with must have its comment prefix defined.
Language-specific modules usually [define prefixes][], but it can also be done
diff --git a/doc/07_Modules.md b/doc/07_Modules.md
index fb8faca1..93347868 100644
--- a/doc/07_Modules.md
+++ b/doc/07_Modules.md
@@ -31,7 +31,7 @@ perhaps a custom context menu. These features are discussed below.
Most language-specific modules have a command that compiles and/or runs the code
in the current file. Pressing `Ctrl+Shift+R` (`⌘⇧R` on Mac OSX | `M-^R` in
-ncurses) executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`)
+curses) executes the command for compiling code and `Ctrl+R` (`⌘R` | `^R`)
executes the command for running code. Double-clicking on any error messages
will jump to where the errors occurred. Note: In order for these features to
work, the language you are working with must have its compile and run commands
@@ -58,7 +58,7 @@ preferences, see the [language module preferences][] section.
Most language-specific modules have a set of key bindings for
[custom commands][]. See the module's [LuaDoc][] or code to find out which key
bindings are assigned. They are typically stored in the `Ctrl+L` (`⌘L` on Mac
-OSX | `M-L` in ncurses) key chain prefix.
+OSX | `M-L` in curses) key chain prefix.
[custom commands]: api/_M.html#Commands
[LuaDoc]: api/index.html
diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md
index ad089fb5..dede2bd6 100644
--- a/doc/08_Preferences.md
+++ b/doc/08_Preferences.md
@@ -134,8 +134,8 @@ You can add global snippets in *~/.textadept/init.lua*, such as:
snippets['path'] = "%<(buffer.filename or ''):match('^.+[/\\]')>"
So typing `file` or `path` and then pressing `Tab` (`⇥` on Mac OSX | `Tab` in
-ncurses) will insert the snippet, regardless of the current programming
-language. You can learn about snippet syntax in the [snippets LuaDoc][].
+curses) will insert the snippet, regardless of the current programming language.
+You can learn about snippet syntax in the [snippets LuaDoc][].
[snippets LuaDoc]: api/_M.textadept.snippets.html
diff --git a/doc/09_Themes.md b/doc/09_Themes.md
index 34d31c4e..3c1de645 100644
--- a/doc/09_Themes.md
+++ b/doc/09_Themes.md
@@ -69,7 +69,7 @@ documentation or read the [LuaDoc][].
## Switch Themes
You can switch between or reload themes using `Ctrl+Shift+T` (`⌘⇧T` on Mac OSX |
-none in ncurses). However, be aware that the views do not reset themselves. Any
+none in curses). However, be aware that the views do not reset themselves. Any
properties set explicitly in the previous theme's *view.lua* file that are not
set explicitly in the new theme will carry over. Restarting Textadept will fix
this. Also, be aware that themes apply to all buffers. You cannot assign a theme
diff --git a/doc/10_Advanced.md b/doc/10_Advanced.md
index 5ac24594..ecf5bc01 100644
--- a/doc/10_Advanced.md
+++ b/doc/10_Advanced.md
@@ -3,7 +3,7 @@
## Command Entry
Access to the Lua state is available through the command entry. Press `Ctrl+E`
-(`⌘E` on Mac OSX | `M-C` in ncurses) to access it. It is useful for debugging,
+(`⌘E` on Mac OSX | `M-C` in curses) to access it. It is useful for debugging,
inspecting, and entering `buffer` or `view` commands. If you try to cause
instability in Textadept's Lua state, you might very well succeed so be careful.
For available commands, see the [Lua API][]. Abbreviated commands for
@@ -24,7 +24,7 @@ command line switches.
### Tab Completion
Tab-completion for functions, variables, tables, etc. is available. Press the
-`Tab` (`⇥` on Mac OSX | `Tab` in ncurses) key to display a list of available
+`Tab` (`⇥` on Mac OSX | `Tab` in curses) key to display a list of available
completions. Use the arrow keys to make a selection and press `Enter` (`↩` |
`Enter`) to insert it.
@@ -41,7 +41,7 @@ the implementation.
## Command Selection
If you did not disable the menu in your [preferences][], then pressing
-`Ctrl+Shift+E` (`⌘⇧E` on Mac OSX | `M-S-C` in ncurses) brings up the command
+`Ctrl+Shift+E` (`⌘⇧E` on Mac OSX | `M-S-C` in curses) brings up the command
selection dialog. Typing part of any command filters the list, with spaces being
wildcards. This is an easy way to run commands without navigating the menus,
using the mouse, or remembering key bindings. It is also useful for looking up
@@ -61,7 +61,7 @@ buffer (or a selection). You could do the following from the command entry:
ls={}; for l in buffer:get_text():gmatch('[^\n]+') do ls[#ls+1]=l end;
table.sort(ls); buffer:set_text(table.concat(ls, '\n'))
-A simpler way would be to press `Ctrl+|` (`⌘|` on Mac OSX | `^\` in ncurses),
+A simpler way would be to press `Ctrl+|` (`⌘|` on Mac OSX | `^\` in curses),
enter the shell command `sort`, and hit `Enter` (`↩` | `Enter`).
The standard input (stdin) for shell commands is determined as follows:
diff --git a/doc/12_Compiling.md b/doc/12_Compiling.md
index 2870d5ed..2c1e3ad4 100644
--- a/doc/12_Compiling.md
+++ b/doc/12_Compiling.md
@@ -18,12 +18,13 @@ Debian-based Linux distributions like Ubuntu, the package is typically called
"libgtk2.0-dev". Otherwise, compile and install GTK+ from the [GTK+ website][].
If you would like to compile the terminal version of Textadept, you will need
-the ncurses development library. Similarly, it should be available from your
-package manager. For Debian-based Linux distributions like Ubuntu, the package
-is typically called "libncurses5-dev". Otherwise, compile and install ncurses
-from the [ncurses website][]. Note: you need to have the wide-character
-development version of ncurses installed, which handles multibyte sequences.
-(Therefore, Debian users will _also_ need "libncursesw5-dev".)
+the development library for a curses implementation like ncurses. Similarly, one
+should be available from your package manager. For Debian-based Linux
+distributions like Ubuntu, the ncurses package is typically called
+"libncurses5-dev". Otherwise, compile and install ncurses from the
+[ncurses website][]. Note: you need to have the wide-character development
+version of ncurses installed, which handles multibyte sequences. (Therefore,
+Debian users will _also_ need "libncursesw5-dev".)
In addition, BSD users will need to have [libiconv][] installed.
@@ -68,7 +69,7 @@ For Linux and BSD systems, simply run `make` in the *src/* directory. The
*textadept* and *textadeptjit* executables are created in the root directory.
Make a symlink from them to */usr/bin/* or elsewhere in your `PATH`.
-Similarly, `make ncurses` builds *textadept-ncurses* and *textadeptjit-ncurses*.
+Similarly, `make curses` builds *textadept-curses* and *textadeptjit-curses*.
Note: you may have to run
@@ -87,8 +88,7 @@ a normal Linux application, run the usual `make` and then `make install` or
*/usr/local* but you can change this by setting `DESTDIR` (e.g.
`make install DESTDIR=/prefix/to/install/to`).
-Similarly, `make ncurses` and `make ncurses install` installs the ncurses
-version.
+Similarly, `make curses` and `make curses install` installs the curses version.
### Cross Compiling for Windows
@@ -113,8 +113,8 @@ and *../textadeptjit.osx*. At this point it is recommended to build a new
*Contents/MacOS/textadept.osx* and *Contents/MacOS/textadeptjit.osx* with your
own versions.
-Similarly, `make osx-ncurses` builds *../textadept-ncurses.osx* and
-*../textadeptjit-ncurses.osx*.
+Similarly, `make osx-curses` builds *../textadept-curses.osx* and
+*../textadeptjit-curses.osx*.
#### Compiling on OSX (Legacy)
@@ -137,8 +137,8 @@ Note: to build a GTK+ for OSX bundle, the following needs to be run from the
where `username` is replaced with your username.
Compiling the terminal version is not so expensive. After uncommenting the
-"Darwin" block mentioned above, simply run `make osx-ncurses` to build
-*../textadept-ncurses.osx* and *../textadeptjit-ncurses.osx*. No additional
+"Darwin" block mentioned above, simply run `make osx-curses` to build
+*../textadept-curses.osx* and *../textadeptjit-curses.osx*. No additional
libraries are needed.
[XCode]: http://developer.apple.com/TOOLS/xcode/
@@ -160,7 +160,7 @@ non-Lua, libraries.
### Notes on CDK
-[CDK][] is a library of ncurses widgets. The terminal version of Textadept
+[CDK][] is a library of curses widgets. The terminal version of Textadept
includes a slightly modified, stripped down version of this library. The changes
made to CDK are as follows:
@@ -173,7 +173,8 @@ made to CDK are as follows:
* *cdk.h* does not `#include` "matrix.h", "viewer.h", and any headers labeled
"Generated headers" due to their machine-dependence.
* *cdk_config.h* no longer defines `HAVE_SETLOCALE` since Textadept handles
- locale settings.
+ locale settings and no longer defines `HAVE_NCURSES_H` and `NCURSES` since
+ Textadept supports multiple curses implementations, not just ncurses.
* The `deleteFileCB` routine in *fselect.c* has been deactivated.
[CDK]: http://invisible-island.net/cdk/
diff --git a/doc/13_Help.md b/doc/13_Help.md
index 673c2759..e17008a1 100644
--- a/doc/13_Help.md
+++ b/doc/13_Help.md
@@ -14,7 +14,7 @@ Switch |Arguments|Description
`-s`, `--session` | 1 |Loads [session][] on startup.
`-u`, `--userhome` | 1 |Sets alternate [`_USERHOME`][].
-The help switch is unavailable in ncurses.
+The help switch is unavailable in curses.
[code]: 10_Advanced.html#Command.Entry
[unique instance]: 02_Installation.html#Single.Instance
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md
index 30f1e56d..adcafac8 100644
--- a/doc/14_Appendix.md
+++ b/doc/14_Appendix.md
@@ -99,12 +99,12 @@ As a special case, the empty capture `()` captures the current string position
[Lua 5.2 Reference Manual]: http://www.lua.org/manual/5.2/manual.html#6.4.1
-## Ncurses Compatibility
+## Curses Compatibility
-Textadept 5.5 beta introduced an ncurses version that can run in a terminal
-emulator. However, since ncurses is quite low-level in terms of graphics
-capability compared to GTK+, the ncurses version of Textadept lacks some
-features in its editing component Scintilla:
+Textadept 5.5 beta introduced a curses version that can run in a terminal
+emulator. However, since curses is quite low-level in terms of graphics
+capability compared to GTK+, the curses version of Textadept lacks some features
+in its editing component Scintilla:
* Any settings with alpha values are not supported.
* Autocompletion lists cannot show images (pixmap surfaces are not supported).
@@ -115,8 +115,8 @@ features in its editing component Scintilla:
drawing arrow shapes).
* Caret settings like period, line style, and width are not supported
(terminals use block carets with their own period definitions).
-* Code pages other than UTF-8 have not been tested and it is possible ncurses
- does not support them.
+* Code pages other than UTF-8 have not been tested and it is possible some
+ curses implementations do not support them.
* Edge lines are not displayed properly (the line is drawn over by text lines).
* Extra ascent and decent for lines is not supported.
* Fold lines are not supported (`surface->LineTo()` is not supported).
diff --git a/modules/cpp/init.lua b/modules/cpp/init.lua
index 87f601b3..5d62691a 100644
--- a/modules/cpp/init.lua
+++ b/modules/cpp/init.lua
@@ -9,7 +9,7 @@ local M = {}
--
-- ## Key Bindings
--
--- + `Ctrl+L, M` (`⌘L, M` on Mac OSX | `M-L, M` in ncurses)
+-- + `Ctrl+L, M` (`⌘L, M` on Mac OSX | `M-L, M` in curses)
-- Open this module for editing.
-- + `.`
-- Show an autocompletion list of members for the symbol behind the caret.
diff --git a/modules/lua/init.lua b/modules/lua/init.lua
index 43a5cc5c..9abe2277 100644
--- a/modules/lua/init.lua
+++ b/modules/lua/init.lua
@@ -9,7 +9,7 @@ local M = {}
--
-- ## Key Bindings
--
--- + `Ctrl+L, M` (`⌘L, M` on Mac OSX | `M-L, M` in ncurses)
+-- + `Ctrl+L, M` (`⌘L, M` on Mac OSX | `M-L, M` in curses)
-- Open this module for editing.
-- + `.`
-- Show an autocompletion list of fields for the symbol behind the caret.
diff --git a/modules/textadept/adeptsense.lua b/modules/textadept/adeptsense.lua
index 9bf23a28..b4fe061d 100644
--- a/modules/textadept/adeptsense.lua
+++ b/modules/textadept/adeptsense.lua
@@ -383,8 +383,8 @@ module('_M.textadept.adeptsense')]]
local senses = {}
-M.FUNCTIONS = not NCURSES and '/* XPM */\nstatic char *function[] = {\n/* columns rows colors chars-per-pixel */\n"16 16 5 1",\n" c #000000",\n". c #E0BC38",\n"X c #F0DC5C",\n"o c #FCFC80",\n"O c None",\n/* pixels */\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOO OOOO",\n"OOOOOOOOO oo OO",\n"OOOOOOOO ooooo O",\n"OOOOOOO ooooo. O",\n"OOOO O XXoo.. O",\n"OOO oo XXX... O",\n"OO ooooo XX.. OO",\n"O ooooo. X. OOO",\n"O XXoo.. O OOOO",\n"O XXX... OOOOOOO",\n"O XXX.. OOOOOOOO",\n"OO X. OOOOOOOOO",\n"OOOO OOOOOOOOOO"\n};' or '*'
-M.FIELDS = not NCURSES and '/* XPM */\nstatic char *field[] = {\n/* columns rows colors chars-per-pixel */\n"16 16 5 1",\n" c #000000",\n". c #8C748C",\n"X c #9C94A4",\n"o c #ACB4C0",\n"O c None",\n/* pixels */\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOO OOOOO",\n"OOOOOOOO oo OOO",\n"OOOOOOO ooooo OO",\n"OOOOOO ooooo. OO",\n"OOOOOO XXoo.. OO",\n"OOOOOO XXX... OO",\n"OOOOOO XXX.. OOO",\n"OOOOOOO X. OOOO",\n"OOOOOOOOO OOOOO",\n"OOOOOOOOOOOOOOOO"\n};' or '+'
+M.FUNCTIONS = not CURSES and '/* XPM */\nstatic char *function[] = {\n/* columns rows colors chars-per-pixel */\n"16 16 5 1",\n" c #000000",\n". c #E0BC38",\n"X c #F0DC5C",\n"o c #FCFC80",\n"O c None",\n/* pixels */\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOO OOOO",\n"OOOOOOOOO oo OO",\n"OOOOOOOO ooooo O",\n"OOOOOOO ooooo. O",\n"OOOO O XXoo.. O",\n"OOO oo XXX... O",\n"OO ooooo XX.. OO",\n"O ooooo. X. OOO",\n"O XXoo.. O OOOO",\n"O XXX... OOOOOOO",\n"O XXX.. OOOOOOOO",\n"OO X. OOOOOOOOO",\n"OOOO OOOOOOOOOO"\n};' or '*'
+M.FIELDS = not CURSES and '/* XPM */\nstatic char *field[] = {\n/* columns rows colors chars-per-pixel */\n"16 16 5 1",\n" c #000000",\n". c #8C748C",\n"X c #9C94A4",\n"o c #ACB4C0",\n"O c None",\n/* pixels */\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOOOOOOOOO",\n"OOOOOOOOO OOOOO",\n"OOOOOOOO oo OOO",\n"OOOOOOO ooooo OO",\n"OOOOOO ooooo. OO",\n"OOOOOO XXoo.. OO",\n"OOOOOO XXX... OO",\n"OOOOOO XXX.. OOO",\n"OOOOOOO X. OOOO",\n"OOOOOOOOO OOOOO",\n"OOOOOOOOOOOOOOOO"\n};' or '+'
M.CLASS = 'classes'
M.FUNCTION = 'functions'
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua
index 568306e6..449626d7 100644
--- a/modules/textadept/bookmarks.lua
+++ b/modules/textadept/bookmarks.lua
@@ -9,7 +9,7 @@ local M = {}
-- The color, in "0xBBGGRR" format, used for a bookmarked line.
module('_M.textadept.bookmarks')]]
-M.MARK_BOOKMARK_COLOR = not NCURSES and 0xB3661A or 0xFF0000
+M.MARK_BOOKMARK_COLOR = not CURSES and 0xB3661A or 0xFF0000
local MARK_BOOKMARK = _SCINTILLA.next_marker_number()
@@ -82,10 +82,10 @@ function M.goto_bookmark()
if line then _M.textadept.editing.goto_line(line:match('^%d+')) end
end
-local NCURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ')
+local CURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ')
-- Sets view properties for bookmark markers.
local function set_bookmark_properties()
- if NCURSES then buffer:marker_define(MARK_BOOKMARK, NCURSES_MARK) end
+ if CURSES then buffer:marker_define(MARK_BOOKMARK, CURSES_MARK) end
buffer.marker_back[MARK_BOOKMARK] = M.MARK_BOOKMARK_COLOR
end
if buffer then set_bookmark_properties() end
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua
index 31e3cff1..7e52282b 100644
--- a/modules/textadept/command_entry.lua
+++ b/modules/textadept/command_entry.lua
@@ -35,7 +35,7 @@ local events = events
events.connect(events.COMMAND_ENTRY_COMMAND, function(command)
local f, err = load(command, nil, 'bt', env)
if err then error(err) end
- if not NCURSES then gui.command_entry.focus() end -- toggle focus to hide
+ if not CURSES then gui.command_entry.focus() end -- toggle focus to hide
f()
events.emit(events.UPDATE_UI)
end)
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index 6a35539b..8957836f 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -44,9 +44,9 @@ M.HIGHLIGHT_BRACES = true
M.TYPEOVER_CHARS = true
M.AUTOINDENT = true
M.STRIP_WHITESPACE_ON_SAVE = true
-M.MARK_HIGHLIGHT_BACK = not NCURSES and (buffer and buffer.caret_line_back or
- 0xEEEEEE) or 0x00FFFF
-M.INDIC_HIGHLIGHT_BACK = not NCURSES and 0x4D99E6 or 0x00FFFF
+M.MARK_HIGHLIGHT_BACK = not CURSES and (buffer and buffer.caret_line_back or
+ 0xEEEEEE) or 0x00FFFF
+M.INDIC_HIGHLIGHT_BACK = not CURSES and 0x4D99E6 or 0x00FFFF
M.INDIC_HIGHLIGHT_ALPHA = 100
---
@@ -543,11 +543,11 @@ function M.highlight_word()
buffer:set_sel(s, e)
end
-local NCURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ')
+local CURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ')
-- Sets view properties for highlighted word indicators and markers.
local function set_highlight_properties()
local buffer = buffer
- if NCURSES then buffer:marker_define(MARK_HIGHLIGHT, NCURSES_MARK) end
+ if CURSES then buffer:marker_define(MARK_HIGHLIGHT, CURSES_MARK) end
buffer.marker_back[MARK_HIGHLIGHT] = M.MARK_HIGHLIGHT_BACK
buffer.indic_fore[INDIC_HIGHLIGHT] = M.INDIC_HIGHLIGHT_BACK
buffer.indic_style[INDIC_HIGHLIGHT] = _SCINTILLA.constants.INDIC_ROUNDBOX
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 866bddf8..d1105a7b 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -60,17 +60,17 @@ local find = gui.find
module('gui.find')]]
local _L = _L
-find.find_label_text = not NCURSES and _L['_Find:'] or _L['Find:']
-find.replace_label_text = not NCURSES and _L['R_eplace:'] or _L['Replace:']
-find.find_next_button_text = not NCURSES and _L['Find _Next'] or _L['[Next]']
-find.find_prev_button_text = not NCURSES and _L['Find _Prev'] or _L['[Prev]']
-find.replace_button_text = not NCURSES and _L['_Replace'] or _L['[Replace]']
-find.replace_all_button_text = not NCURSES and _L['Replace _All'] or _L['[All]']
-find.match_case_label_text = not NCURSES and _L['_Match case'] or _L['Case(F1)']
-find.whole_word_label_text = not NCURSES and _L['_Whole word'] or _L['Word(F2)']
-find.lua_pattern_label_text = not NCURSES and _L['_Lua pattern'] or
+find.find_label_text = not CURSES and _L['_Find:'] or _L['Find:']
+find.replace_label_text = not CURSES and _L['R_eplace:'] or _L['Replace:']
+find.find_next_button_text = not CURSES and _L['Find _Next'] or _L['[Next]']
+find.find_prev_button_text = not CURSES and _L['Find _Prev'] or _L['[Prev]']
+find.replace_button_text = not CURSES and _L['_Replace'] or _L['[Replace]']
+find.replace_all_button_text = not CURSES and _L['Replace _All'] or _L['[All]']
+find.match_case_label_text = not CURSES and _L['_Match case'] or _L['Case(F1)']
+find.whole_word_label_text = not CURSES and _L['_Whole word'] or _L['Word(F2)']
+find.lua_pattern_label_text = not CURSES and _L['_Lua pattern'] or
_L['Pattern(F3)']
-find.in_files_label_text = not NCURSES and _L['_In files'] or _L['Files(F4)']
+find.in_files_label_text = not CURSES and _L['_In files'] or _L['Files(F4)']
-- Events.
local events, events_connect = events, events.connect
@@ -236,7 +236,7 @@ end
-- Begins an incremental find using the command entry.
-- Only the `match_case` find option is recognized. Normal command entry
-- functionality will be unavailable until the search is finished by pressing
--- `Esc` (`⎋` on Mac OSX | `Esc` in ncurses).
+-- `Esc` (`⎋` on Mac OSX | `Esc` in curses).
-- @name find_incremental
function find.find_incremental()
find.incremental, find.incremental_start = true, buffer.current_pos
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua
index a11f09b4..8fa15a19 100644
--- a/modules/textadept/keys.lua
+++ b/modules/textadept/keys.lua
@@ -190,7 +190,7 @@ local M = {}
-- N/A |N/A |^] |Swap caret and mark anchor
-- **Other** | | |
-- Ctrl+Shift+U, xxxx, Enter|None|None|Input Unicode character U-xxxx.
--- **ncurses CDK Fields**| | |
+-- **curses CDK Fields**| | |
-- N/A |N/A|^B<br/>Left |Cursor left
-- N/A |N/A|^F<br/>Right|Cursor right
-- N/A |N/A|Del |Delete forward
@@ -334,7 +334,7 @@ local utils = M.utils
-- Command, Option, Shift, and 'a' = 'amA'
-- Command, Option, Shift, and '\t' = 'ams\t'
--
--- ncurses key commands.
+-- curses key commands.
--
-- The terminal keymap is much more limited and complicated:
-- * Control+[Shift+](digit/symbol) gives limited results.
@@ -367,14 +367,14 @@ local utils = M.utils
-- Control, Meta, and 'a' = 'cma'
-- File.
-keys[not OSX and (not NCURSES and 'cn' or 'cmn') or 'mn'] = new_buffer
+keys[not OSX and (not CURSES and 'cn' or 'cmn') or 'mn'] = new_buffer
keys[not OSX and 'co' or 'mo'] = io.open_file
-keys[not OSX and not NCURSES and 'cao' or 'cmo'] = io.open_recent_file
-keys[not OSX and (not NCURSES and 'cO' or 'mo') or 'mO'] = buffer.reload
+keys[not OSX and not CURSES and 'cao' or 'cmo'] = io.open_recent_file
+keys[not OSX and (not CURSES and 'cO' or 'mo') or 'mO'] = buffer.reload
keys[not OSX and 'cs' or 'ms'] = buffer.save
-keys[not OSX and (not NCURSES and 'cS' or 'cms') or 'mS'] = buffer.save_as
+keys[not OSX and (not CURSES and 'cS' or 'cms') or 'mS'] = buffer.save_as
keys[not OSX and 'cw' or 'mw'] = buffer.close
-keys[not OSX and (not NCURSES and 'cW' or 'cmw') or 'mW'] = io.close_all
+keys[not OSX and (not CURSES and 'cW' or 'cmw') or 'mW'] = io.close_all
-- TODO: m_textadept.sessions.load
-- TODO: m_textadept.sessions.save
keys[not OSX and 'cq' or 'mq'] = quit
@@ -382,136 +382,135 @@ keys[not OSX and 'cq' or 'mq'] = quit
-- Edit.
keys[not OSX and 'cz' or 'mz'] = buffer.undo
if not OSX then keys.cy = buffer.redo end
-if not NCURSES then keys[not OSX and 'cZ' or 'mZ'] = buffer.redo end
+if not CURSES then keys[not OSX and 'cZ' or 'mZ'] = buffer.redo end
keys[not OSX and 'cx' or 'mx'] = buffer.cut
keys[not OSX and 'cc' or 'mc'] = buffer.copy
keys[not OSX and 'cv' or 'mv'] = buffer.paste
-if not NCURSES then keys[not OSX and 'cd' or 'md'] = buffer.line_duplicate end
+if not CURSES then keys[not OSX and 'cd' or 'md'] = buffer.line_duplicate end
keys.del = buffer.clear
-keys[not OSX and (not NCURSES and 'adel' or 'mdel')
+keys[not OSX and (not CURSES and 'adel' or 'mdel')
or 'cdel'] = utils.delete_word
-keys[not OSX and not NCURSES and 'ca' or 'ma'] = buffer.select_all
-keys[not NCURSES and 'cm' or 'mm'] = m_editing.match_brace
-keys[not OSX and (not NCURSES and 'c\n' or 'cmj')
+keys[not OSX and not CURSES and 'ca' or 'ma'] = buffer.select_all
+keys[not CURSES and 'cm' or 'mm'] = m_editing.match_brace
+keys[not OSX and (not CURSES and 'c\n' or 'cmj')
or 'cesc'] = {m_editing.autocomplete_word, '%w_'}
-if not NCURSES then
+if not CURSES then
keys[not OSX and 'caH' or 'mH'] = m_editing.highlight_word
end
-keys[not OSX and not NCURSES and 'c/' or 'm/'] = m_editing.block_comment
+keys[not OSX and not CURSES and 'c/' or 'm/'] = m_editing.block_comment
keys.ct = m_editing.transpose_chars
-keys[not OSX and (not NCURSES and 'cJ' or 'mj') or 'cj'] = m_editing.join_lines
+keys[not OSX and (not CURSES and 'cJ' or 'mj') or 'cj'] = m_editing.join_lines
-- Select.
-keys[not NCURSES and 'cM' or 'mM'] = {m_editing.match_brace, 'select'}
-keys[not OSX and not NCURSES and 'c<'
- or 'm<'] = {m_editing.select_enclosed, '>', '<'}
-if not NCURSES then
+keys[not CURSES and 'cM' or 'mM'] = {m_editing.match_brace, 'select'}
+keys[not OSX and not CURSES and 'c<'
+ or 'm<'] = {m_editing.select_enclosed, '>', '<'}
+if not CURSES then
keys[not OSX and 'c>' or 'm>'] = {m_editing.select_enclosed, '<', '>'}
end
-keys[not OSX and not NCURSES and "c'"
- or "m'"] = {m_editing.select_enclosed, "'", "'"}
-keys[not OSX and not NCURSES and 'c"'
- or 'm"'] = {m_editing.select_enclosed, '"', '"'}
-keys[not OSX and not NCURSES and 'c('
- or 'm('] = {m_editing.select_enclosed, '(', ')'}
-keys[not OSX and not NCURSES and 'c['
- or 'm['] = {m_editing.select_enclosed, '[', ']'}
-keys[not OSX and not NCURSES and 'c{'
- or 'm{'] = {m_editing.select_enclosed, '{', '}'}
-keys[not OSX and (not NCURSES and 'cD' or 'mW') or 'mD'] = m_editing.select_word
-keys[not OSX and not NCURSES and 'cN' or 'mN'] = m_editing.select_line
-keys[not OSX and not NCURSES and 'cP' or 'mP'] = m_editing.select_paragraph
-keys[not OSX and not NCURSES and 'cI' or 'mI'] = m_editing.select_indented_block
+keys[not OSX and not CURSES and "c'"
+ or "m'"] = {m_editing.select_enclosed, "'", "'"}
+keys[not OSX and not CURSES and 'c"'
+ or 'm"'] = {m_editing.select_enclosed, '"', '"'}
+keys[not OSX and not CURSES and 'c('
+ or 'm('] = {m_editing.select_enclosed, '(', ')'}
+keys[not OSX and not CURSES and 'c['
+ or 'm['] = {m_editing.select_enclosed, '[', ']'}
+keys[not OSX and not CURSES and 'c{'
+ or 'm{'] = {m_editing.select_enclosed, '{', '}'}
+keys[not OSX and (not CURSES and 'cD' or 'mW') or 'mD'] = m_editing.select_word
+keys[not OSX and not CURSES and 'cN' or 'mN'] = m_editing.select_line
+keys[not OSX and not CURSES and 'cP' or 'mP'] = m_editing.select_paragraph
+keys[not OSX and not CURSES and 'cI' or 'mI'] = m_editing.select_indented_block
-- Selection.
keys[not OSX and 'cau' or 'cu'] = buffer.upper_case
-keys[not OSX and (not NCURSES and 'caU' or 'cml') or 'cU'] = buffer.lower_case
-keys[not OSX and (not NCURSES and 'a<' or 'm>')
+keys[not OSX and (not CURSES and 'caU' or 'cml') or 'cU'] = buffer.lower_case
+keys[not OSX and (not CURSES and 'a<' or 'm>')
or 'c<'] = utils.enclose_as_xml_tags
-if not NCURSES then
+if not CURSES then
keys[not OSX and 'a>' or 'c>'] = {m_editing.enclose, '<', ' />'}
keys[not OSX and "a'" or "c'"] = {m_editing.enclose, "'", "'"}
keys[not OSX and 'a"' or 'c"'] = {m_editing.enclose, '"', '"'}
end
-keys[not OSX and (not NCURSES and 'a(' or 'm)')
+keys[not OSX and (not CURSES and 'a(' or 'm)')
or 'c('] = {m_editing.enclose, '(', ')'}
-keys[not OSX and (not NCURSES and 'a[' or 'm]')
+keys[not OSX and (not CURSES and 'a[' or 'm]')
or 'c['] = {m_editing.enclose, '[', ']'}
-keys[not OSX and (not NCURSES and 'a{' or 'm}')
+keys[not OSX and (not CURSES and 'a{' or 'm}')
or 'c{'] = {m_editing.enclose, '{', '}'}
-keys[not OSX and not NCURSES and 'c+' or 'm+'] = {m_editing.grow_selection, 1}
-keys[not OSX and not NCURSES and 'c_' or 'm_'] = {m_editing.grow_selection, -1}
+keys[not OSX and not CURSES and 'c+' or 'm+'] = {m_editing.grow_selection, 1}
+keys[not OSX and not CURSES and 'c_' or 'm_'] = {m_editing.grow_selection, -1}
keys.csup = buffer.move_selected_lines_up
keys.csdown = buffer.move_selected_lines_down
-- Search.
-keys[not OSX and not NCURSES and 'cf' or 'mf'] = gui_find.focus
-if NCURSES then keys.mF = keys.mf end -- in case mf is used by GUI terminals
-keys[not OSX and not NCURSES and 'cg' or 'mg'] = gui_find.find_next
-if not OSX and not NCURSES then keys.f3 = keys.cg end
-keys[not OSX and not NCURSES and 'cG' or 'mG'] = gui_find.find_prev
-if not OSX and not NCURSES then keys.sf3 = keys.cG end
-keys[not OSX and (not NCURSES and 'car' or 'mr') or 'cr'] = gui_find.replace
-keys[not OSX and (not NCURSES and 'caR' or 'mR') or 'cR'] = gui_find.replace_all
+keys[not OSX and not CURSES and 'cf' or 'mf'] = gui_find.focus
+if CURSES then keys.mF = keys.mf end -- in case mf is used by GUI terminals
+keys[not OSX and not CURSES and 'cg' or 'mg'] = gui_find.find_next
+if not OSX and not CURSES then keys.f3 = keys.cg end
+keys[not OSX and not CURSES and 'cG' or 'mG'] = gui_find.find_prev
+if not OSX and not CURSES then keys.sf3 = keys.cG end
+keys[not OSX and (not CURSES and 'car' or 'mr') or 'cr'] = gui_find.replace
+keys[not OSX and (not CURSES and 'caR' or 'mR') or 'cR'] = gui_find.replace_all
-- Find Next is an when find pane is focused in GUI.
-- Find Prev is ap when find pane is focused in GUI.
-- Replace is ar when find pane is focused in GUI.
-- Replace All is aa when find pane is focused in GUI.
-keys[not OSX and not NCURSES and 'caf' or 'cmf'] = gui_find.find_incremental
-if not NCURSES then keys[not OSX and 'cF' or 'mF'] = utils.find_in_files end
+keys[not OSX and not CURSES and 'caf' or 'cmf'] = gui_find.find_incremental
+if not CURSES then keys[not OSX and 'cF' or 'mF'] = utils.find_in_files end
-- Find in Files is ai when find pane is focused in GUI.
-if not NCURSES then
+if not CURSES then
keys[not OSX and 'cag' or 'cmg'] = {gui_find.goto_file_in_list, true}
keys[not OSX and 'caG' or 'cmG'] = {gui_find.goto_file_in_list, false}
end
keys[not OSX and 'cj' or 'mj'] = m_editing.goto_line
-- Tools.
-keys[not OSX and (not NCURSES and 'ce' or 'mc')
+keys[not OSX and (not CURSES and 'ce' or 'mc')
or 'me'] = gui.command_entry.focus
-keys[not OSX and (not NCURSES and 'cE' or 'mC')
- or 'mE'] = utils.select_command
+keys[not OSX and (not CURSES and 'cE' or 'mC') or 'mE'] = utils.select_command
keys[not OSX and 'cr' or 'mr'] = m_textadept.run.run
-keys[not OSX and (not NCURSES and 'cR' or 'cmr')
+keys[not OSX and (not CURSES and 'cR' or 'cmr')
or 'mR'] = m_textadept.run.compile
-keys[not OSX and (not NCURSES and 'c|' or 'c\\')
+keys[not OSX and (not CURSES and 'c|' or 'c\\')
or 'm|'] = m_textadept.filter_through.filter_through
-- Adeptsense.
-keys[not OSX and (not NCURSES and 'c ' or 'c@')
+keys[not OSX and (not CURSES and 'c ' or 'c@')
or 'aesc'] = m_textadept.adeptsense.complete
-keys[not NCURSES and 'ch' or 'mh'] = m_textadept.adeptsense.show_apidoc
-if NCURSES then keys.mH = keys.mh end -- in case mh is used by GUI terminals
+keys[not CURSES and 'ch' or 'mh'] = m_textadept.adeptsense.show_apidoc
+if CURSES then keys.mH = keys.mh end -- in case mh is used by GUI terminals
-- Snippets.
-keys[not OSX and (not NCURSES and 'ck' or 'mk') or 'a\t'] = m_snippets._select
+keys[not OSX and (not CURSES and 'ck' or 'mk') or 'a\t'] = m_snippets._select
keys['\t'] = m_snippets._insert
keys['s\t'] = m_snippets._previous
-keys[not OSX and (not NCURSES and 'cK' or 'mK')
+keys[not OSX and (not CURSES and 'cK' or 'mK')
or 'as\t'] = m_snippets._cancel_current
-- Bookmark.
-keys[not OSX and (not NCURSES and 'cf2' or 'f1') or 'mf2'] = m_bookmarks.toggle
-keys[not OSX and (not NCURSES and 'csf2' or 'f6') or 'msf2'] = m_bookmarks.clear
+keys[not OSX and (not CURSES and 'cf2' or 'f1') or 'mf2'] = m_bookmarks.toggle
+keys[not OSX and (not CURSES and 'csf2' or 'f6') or 'msf2'] = m_bookmarks.clear
keys.f2 = m_bookmarks.goto_next
-keys[not NCURSES and 'sf2' or 'f3'] = m_bookmarks.goto_prev
-keys[not NCURSES and 'af2' or 'f4'] = m_bookmarks.goto_bookmark
+keys[not CURSES and 'sf2' or 'f3'] = m_bookmarks.goto_prev
+keys[not CURSES and 'af2' or 'f4'] = m_bookmarks.goto_bookmark
-- Snapopen.
keys[not OSX and 'cu' or 'mu'] = {io.snapopen, _USERHOME}
-- TODO: {io.snapopen, _HOME}
-keys[not OSX and (not NCURSES and 'caO' or 'mO')
+keys[not OSX and (not CURSES and 'caO' or 'mO')
or 'cmO'] = utils.snapopen_filedir
-if not NCURSES then keys[not OSX and 'ci' or 'mi'] = utils.show_style end
+if not CURSES then keys[not OSX and 'ci' or 'mi'] = utils.show_style end
-- Buffer.
-keys[not NCURSES and 'c\t' or 'mn'] = {view.goto_buffer, view, 1, true}
-keys[not NCURSES and 'cs\t' or 'mp'] = {view.goto_buffer, view, -1, true}
-keys[not OSX and not NCURSES and 'cb' or 'mb'] = gui.switch_buffer
-if NCURSES then keys.mB = keys.mb end -- in case mb is used by GUI terminals
+keys[not CURSES and 'c\t' or 'mn'] = {view.goto_buffer, view, 1, true}
+keys[not CURSES and 'cs\t' or 'mp'] = {view.goto_buffer, view, -1, true}
+keys[not OSX and not CURSES and 'cb' or 'mb'] = gui.switch_buffer
+if CURSES then keys.mB = keys.mb end -- in case mb is used by GUI terminals
-- Indentation.
-- TODO: {utils.set_indentation, 2}
-- TODO: {utils.set_indentation, 3}
-- TODO: {utils.set_indentation, 4}
-- TODO: {utils.set_indentation, 8}
-keys[not OSX and (not NCURSES and 'caT' or 'mt')
+keys[not OSX and (not CURSES and 'caT' or 'mt')
or 'cT'] = {utils.toggle_property, 'use_tabs'}
-if NCURSES then keys.mT = keys.mt end -- in case mt is used by GUI terminals
-keys[not OSX and (not NCURSES and 'cai' or 'mi')
+if CURSES then keys.mT = keys.mt end -- in case mt is used by GUI terminals
+keys[not OSX and (not CURSES and 'cai' or 'mi')
or 'ci'] = m_editing.convert_indentation
-- EOL Mode.
-- TODO: {utils.set_eol_mode, c.SC_EOL_CRLF}
@@ -523,13 +522,13 @@ keys[not OSX and (not NCURSES and 'cai' or 'mi')
-- TODO: {utils.set_encoding, 'ISO-8859-1'}
-- TODO: {utils.set_encoding, 'MacRoman'}
-- TODO: {utils.set_encoding, 'UTF-16LE'}
-keys[not OSX and not NCURSES and 'cL'
- or 'mL'] = m_textadept.mime_types.select_lexer
+keys[not OSX and not CURSES and 'cL'
+ or 'mL'] = m_textadept.mime_types.select_lexer
keys.f5 = {buffer.colourise, buffer, 0, -1}
-if NCURSES then keys.cl = keys.f5 end
+if CURSES then keys.cl = keys.f5 end
-- View.
-if not NCURSES then
+if not CURSES then
keys[not OSX and 'can' or 'ca\t'] = {gui.goto_view, 1, true}
keys[not OSX and 'cap' or 'cas\t'] = {gui.goto_view, -1, true}
keys[not OSX and 'cas' or 'cs'] = {view.split, view}
@@ -541,8 +540,8 @@ if not NCURSES then
keys[not OSX and 'ca=' or 'c='] = {utils.grow, 10}
keys[not OSX and 'ca-' or 'c-'] = {utils.shrink, 10}
end
-keys[not OSX and not NCURSES and 'c*' or 'm*'] = utils.toggle_current_fold
-if not NCURSES then
+keys[not OSX and not CURSES and 'c*' or 'm*'] = utils.toggle_current_fold
+if not CURSES then
keys[not OSX and 'ca\n' or 'c\n'] = {utils.toggle_property, 'view_eol'}
if not OSX then keys['ca\n\r'] = keys['ca\n'] end
keys[not OSX and 'ca\\' or 'c\\'] = {utils.toggle_property, 'wrap_mode'}
@@ -552,13 +551,13 @@ if not NCURSES then
keys[not OSX and 'caV' or 'cV'] =
{utils.toggle_property, 'virtual_space_options', c.SCVS_USERACCESSIBLE}
end
-keys[not OSX and not NCURSES and 'c=' or 'm='] = buffer.zoom_in
-keys[not OSX and not NCURSES and 'c-' or 'm-'] = buffer.zoom_out
-keys[not OSX and not NCURSES and 'c0' or 'm0'] = utils.reset_zoom
-if not NCURSES then keys[not OSX and 'cT' or 'mT'] = gui.select_theme end
+keys[not OSX and not CURSES and 'c=' or 'm='] = buffer.zoom_in
+keys[not OSX and not CURSES and 'c-' or 'm-'] = buffer.zoom_out
+keys[not OSX and not CURSES and 'c0' or 'm0'] = utils.reset_zoom
+if not CURSES then keys[not OSX and 'cT' or 'mT'] = gui.select_theme end
-- Help.
-if not NCURSES then
+if not CURSES then
keys.f1 = {utils.open_webpage, _HOME..'/doc/01_Introduction.html'}
keys.sf1 = {utils.open_webpage, _HOME..'/doc/api/index.html'}
end
@@ -582,7 +581,7 @@ if OSX then
-- GTKOSX reports Fn-key as a single keycode which confuses Scintilla. Do
-- not propagate it.
keys.fn = function() return true end
-elseif NCURSES then
+elseif CURSES then
keys['c^'] = function() _G.buffer.selection_mode = 0 end
keys['c]'] = buffer.swap_main_anchor_caret
keys.cf, keys.cb = buffer.char_right, buffer.char_left
diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua
index b1ffd0c2..f4784b5d 100644
--- a/modules/textadept/menu.lua
+++ b/modules/textadept/menu.lua
@@ -330,7 +330,7 @@ function M.set_contextmenu(menu)
contextmenu_actions = {}
gui.context_menu = gui.menu(read_menu_table(menu, true))
end
-if not NCURSES then M.set_contextmenu(M.context_menu) end
+if not CURSES then M.set_contextmenu(M.context_menu) end
local columns = {_L['Command'], _L['Key Command']}
---
@@ -338,7 +338,7 @@ local columns = {_L['Command'], _L['Key Command']}
-- @name select_command
function M.select_command()
local i = gui.filteredlist(_L['Run Command'], columns, items, true,
- NCURSES and {'--width', gui.size[1] - 2} or '')
+ CURSES and {'--width', gui.size[1] - 2} or '')
if i then keys.run_command(commands[i + 1], type(commands[i + 1])) end
end
@@ -353,7 +353,7 @@ events_connect(events.MENU_CLICKED, function(menu_id)
keys.run_command(action, type(action))
end)
-if not NCURSES then
+if not CURSES then
-- Set a language-specific context menu or the default one.
local function set_language_contextmenu()
local lang = _G.buffer:get_lexer(true)
diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua
index 35ecf9be..9f21a65a 100644
--- a/modules/textadept/session.lua
+++ b/modules/textadept/session.lua
@@ -7,9 +7,9 @@ local M = {}
-- Session support for Textadept.
-- @field DEFAULT_SESSION (string)
-- The path to the default session file, *`_USERHOME`/session*, or
--- *`_USERHOME`/session_term* if [`_G.NCURSES`][] is `true`.
+-- *`_USERHOME`/session_term* if [`_G.CURSES`][] is `true`.
--
--- [`_G.NCURSES`]: _G.html#NCURSES
+-- [`_G.CURSES`]: _G.html#CURSES
-- @field SAVE_ON_QUIT (bool)
-- Save the session when quitting.
-- The default value is `true`, but is disabled when passing the command line
@@ -22,7 +22,7 @@ local M = {}
-- [`io.recent_files`]: io.html#recent_files
module('_M.textadept.session')]]
-M.DEFAULT_SESSION = _USERHOME..(not NCURSES and '/session' or '/session_term')
+M.DEFAULT_SESSION = _USERHOME..(not CURSES and '/session' or '/session_term')
M.SAVE_ON_QUIT = true
M.MAX_RECENT_FILES = 10
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index 3e1d784a..5917f41c 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -198,7 +198,7 @@ function M._select()
local i = gui.filteredlist(_L['Select Snippet'],
{_L['Trigger'], _L['Scope'], _L['Snippet Text']},
t, true, '--output-column', '2',
- NCURSES and {'--width', gui.size[1] - 2} or '')
+ CURSES and {'--width', gui.size[1] - 2} or '')
if i then M._insert(t[(i + 1) * 3]) end
end
diff --git a/src/Makefile b/src/Makefile
index 5bb536a8..c1b266e1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -39,7 +39,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
LDFLAGS = -liconv -rdynamic
MAKE = make
- ifneq (osx-ncurses, $(MAKECMDGOALS))
+ ifneq (osx-curses, $(MAKECMDGOALS))
plat_flag = -DGTK
gtk_flags = $(shell PKG_CONFIG_PATH=`pwd`/gtkosx/lib/pkgconfig \
pkg-config --define-variable=prefix=gtkosx \
@@ -48,9 +48,9 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
pkg-config --define-variable=prefix=gtkosx \
--libs gtk+-2.0) -framework Cocoa -lgtkmacintegration
else
- plat_flag = -DNCURSES
- ncurses_lib = -lncurses
- .DEFAULT_GOAL := osx-ncurses
+ plat_flag = -DCURSES
+ curses_lib = -lncurses
+ .DEFAULT_GOAL := osx-curses
endif
libluajit = libluajit.osx.a
@@ -65,7 +65,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
LDFLAGS += -ldl
MAKE = make
else
- ifeq (ncurses, $(findstring ncurses, $(MAKECMDGOALS)))
+ ifeq (curses, $(findstring curses, $(MAKECMDGOALS)))
LDFLAGS += -liconv
endif
MAKE = gmake
@@ -75,7 +75,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
bin_dir = $(DESTDIR)$(PREFIX)/bin
data_dir = $(DESTDIR)$(PREFIX)/share/textadept
- ifneq (ncurses, $(findstring ncurses, $(MAKECMDGOALS)))
+ ifneq (curses, $(findstring curses, $(MAKECMDGOALS)))
plat_flag = -DGTK
ifndef GTK3
gtk_version = 2.0
@@ -86,9 +86,9 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
gtk_libs = $(shell pkg-config --libs gtk+-$(gtk_version))
install_targets = ../textadept ../textadeptjit
else
- plat_flag = -DNCURSES
- ncurses_lib = -lncursesw
- install_targets = ../textadept-ncurses ../textadeptjit-ncurses
+ plat_flag = -DCURSES
+ curses_lib = -lncursesw
+ install_targets = ../textadept-curses ../textadeptjit-curses
endif
x64 = $(shell echo "" | $(CC) -E -dM - | grep __x86_64__ | cut -d ' ' -f 3)
ifeq (1, $(x64))
@@ -109,7 +109,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
# LUAFLAGS = -DLUA_USE_MACOSX
# LDFLAGS = -liconv -rdynamic
#
-# #ifneq (ncurses, $(MAKECMDGOALS))
+# #ifneq (curses, $(MAKECMDGOALS))
# plat_flag = -DGTK
# gtk_flags = $(shell PKG_CONFIG_PATH=`pwd`/gtkosx/lib/pkgconfig \
# gtkosx/bin/pkg-config --define-variable=prefix=gtkosx \
@@ -119,9 +119,9 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
# --libs gtk+-2.0) -framework Cocoa -lgtkmacintegration
# .DEFAULT_GOAL := osx
# #else
-# # plat_flag = -DNCURSES
-# # ncurses_lib = -lncurses
-# # .DEFAULT_GOAL := osx-ncurses
+# # plat_flag = -DCURSES
+# # curses_lib = -lncurses
+# # .DEFAULT_GOAL := osx-curses
# #endif
#
# luadoc = luadoc
@@ -179,12 +179,12 @@ cdk_objs = binding.o buttonbox.o button.o cdk.o cdk_display.o cdk_objs.o \
# Build.
all: textadept textadeptjit
-ncurses: textadept-ncurses textadeptjit-ncurses
-m32: textadept32 textadeptjit32 textadept32-ncurses textadeptjit32-ncurses
+curses: textadept-curses textadeptjit-curses
+m32: textadept32 textadeptjit32 textadept32-curses textadeptjit32-curses
win32: textadept.exe textadeptjit.exe
win64: textadept64.exe #textadeptjit64.exe
osx: textadept.osx textadeptjit.osx
-osx-ncurses: textadept-ncurses.osx textadeptjit-ncurses.osx
+osx-curses: textadept-curses.osx textadeptjit-curses.osx
tmp:
rm -rf /tmp/tabuild && hg clone ../ /tmp/tabuild
@@ -211,21 +211,21 @@ LexLPeg.o: LexLPeg.cxx
LexLPegjit.o: LexLPeg.cxx
$(CROSS)$(CXX) -c $(CXXFLAGS) $(LUAFLAGS) $(sci_flags) -DLPEG_LEXER \
-DNO_SCITE -Iluajit/src $< -o $@
-LexLPeg-ncurses.o: LexLPeg.cxx
+LexLPeg-curses.o: LexLPeg.cxx
$(CROSS)$(CXX) -c $(CXXFLAGS) $(LUAFLAGS) $(sci_flags) -DLPEG_LEXER \
- -DNO_SCITE -DNCURSES -Ilua/src $< -o $@
-LexLPegjit-ncurses.o: LexLPeg.cxx
+ -DNO_SCITE -DCURSES -Ilua/src $< -o $@
+LexLPegjit-curses.o: LexLPeg.cxx
$(CROSS)$(CXX) -c $(CXXFLAGS) $(LUAFLAGS) $(sci_flags) -DLPEG_LEXER \
- -DNO_SCITE -DNCURSES -Iluajit/src $< -o $@
+ -DNO_SCITE -DCURSES -Iluajit/src $< -o $@
textadept.o: textadept.c
$(CROSS)$(CC) -c $(CFLAGS) $(ta_flags) -Ilua/src $(gtk_flags) $<
textadeptjit.o: textadept.c
$(CROSS)$(CC) -c $(CFLAGS) $(ta_flags) -DLUAJIT -Iluajit/src $(gtk_flags) $< \
-o $@
-textadept-ncurses.o: textadept.c
+textadept-curses.o: textadept.c
$(CROSS)$(CC) -c $(CFLAGS) $(ta_flags) -Ilua/src -Iscintilla/term -Itermkey \
-Icdk $< -o $@
-textadeptjit-ncurses.o: textadept.c
+textadeptjit-curses.o: textadept.c
$(CROSS)$(CC) -c $(CFLAGS) $(ta_flags) -DLUAJIT -Iluajit/src \
-Iscintilla/term -Itermkey -Icdk $< -o $@
$(lua_objs): lua/src/*.c lua/src/lib/*.c #lua/src/lib/lpeg/*.c
@@ -251,8 +251,8 @@ libluajit.osx.a:
cp luajit/src/libluajit.a $@
gtdialog.o: gtdialog/gtdialog.c
$(CROSS)$(CC) -c $(CFLAGS) -DGTK -DNOHELP -DLIBRARY $(gtk_flags) $<
-gtdialog-ncurses.o: gtdialog/gtdialog.c
- $(CROSS)$(CC) -c $(CFLAGS) -DNCURSES -DNOHELP -DLIBRARY -Icdk $< -o $@
+gtdialog-curses.o: gtdialog/gtdialog.c
+ $(CROSS)$(CC) -c $(CFLAGS) -DCURSES -DNOHELP -DLIBRARY -Icdk $< -o $@
$(termkey_objs): termkey/*.c
$(CROSS)$(CC) -c $(CFLAGS) -std=c99 $^
$(cdk_objs): cdk/*.c
@@ -268,18 +268,18 @@ textadept: $(scintilla_objs) $(scintilla_gtk_objs) scintilla-marshal.o \
textadeptjit: $(scintilla_objs) $(scintilla_gtk_objs) scintilla-marshal.o \
LexLPegjit.o textadeptjit.o $(luajit_objs) $(libluajit) gtdialog.o
$(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(gtk_libs) $(LDFLAGS)
-textadept-ncurses: $(scintilla_objs) ScintillaTerm.o LexLPeg-ncurses.o \
- textadept-ncurses.o $(lua_objs) gtdialog-ncurses.o \
- $(termkey_objs) $(cdk_objs)
- $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(ncurses_lib) $(LDFLAGS)
-textadeptjit-ncurses: $(scintilla_objs) ScintillaTerm.o LexLPegjit-ncurses.o \
- textadeptjit-ncurses.o $(luajit_objs) $(libluajit) \
- gtdialog-ncurses.o $(termkey_objs) $(cdk_objs)
- $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(ncurses_lib) $(LDFLAGS)
+textadept-curses: $(scintilla_objs) ScintillaTerm.o LexLPeg-curses.o \
+ textadept-curses.o $(lua_objs) gtdialog-curses.o \
+ $(termkey_objs) $(cdk_objs)
+ $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(curses_lib) $(LDFLAGS)
+textadeptjit-curses: $(scintilla_objs) ScintillaTerm.o LexLPegjit-curses.o \
+ textadeptjit-curses.o $(luajit_objs) $(libluajit) \
+ gtdialog-curses.o $(termkey_objs) $(cdk_objs)
+ $(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(curses_lib) $(LDFLAGS)
textadept32: ../textadept; mv $< ../$@
textadeptjit32: ../textadeptjit; mv $< ../$@
-textadept32-ncurses: ../textadept-ncurses; mv $< ../$@
-textadeptjit32-ncurses: ../textadeptjit-ncurses; mv $< ../$@
+textadept32-curses: ../textadept-curses; mv $< ../$@
+textadeptjit32-curses: ../textadeptjit-curses; mv $< ../$@
textadept.exe: $(scintilla_objs) $(scintilla_gtk_objs) scintilla-marshal.o \
LexLPeg.o textadept.o textadept_rc.o $(lua_objs) gtdialog.o
$(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(gtk_libs) $(LDFLAGS)
@@ -296,8 +296,8 @@ textadeptjit64.exe: $(scintilla_objs) $(scintilla_gtk_objs) \
$(CROSS)$(CXX) $(CXXFLAGS) -o ../$@ $^ $(gtk_libs) $(LDFLAGS)
textadept.osx: textadept; mv ../$< ../$@
textadeptjit.osx: textadeptjit; mv ../$< ../$@
-textadept-ncurses.osx: textadept-ncurses; mv ../$< ../$@
-textadeptjit-ncurses.osx: textadeptjit-ncurses; mv ../$< ../$@
+textadept-curses.osx: textadept-curses; mv ../$< ../$@
+textadeptjit-curses.osx: textadeptjit-curses; mv ../$< ../$@
# Install/uninstall.
@@ -341,9 +341,9 @@ basedir = textadept_$(shell grep "_RELEASE =" ../core/init.lua | \
cut -d ' ' -f 4- | sed -e 's/"//; s/ /_/g;')
modules = css hypertext java rails rhtml ruby php python
-release: ../textadept ../textadeptjit ../textadept-ncurses \
- ../textadeptjit-ncurses ../textadept32 ../textadeptjit32 \
- ../textadept32-ncurses ../textadeptjit32-ncurses ../textadept.exe \
+release: ../textadept ../textadeptjit ../textadept-curses \
+ ../textadeptjit-curses ../textadept32 ../textadeptjit32 \
+ ../textadept32-curses ../textadeptjit32-curses ../textadept.exe \
../textadeptjit.exe ../textadept64.exe ../textadept.osx \
../textadeptjit.osx lua51.dll \
doc pkg_x86_64 pkg_i386 pkg_win32 pkg_win64 pkg_osx pkg_src \
@@ -356,11 +356,11 @@ $(basedir):
rm $@/.hg*
cp -rL ../doc $@
hg clone /home/mitchell/code/scintillua tmp && mv tmp/lexers $@ && rm -r tmp
-$(basedir).x86_64: ../textadept ../textadeptjit ../textadept-ncurses \
- ../textadeptjit-ncurses | $(basedir)
+$(basedir).x86_64: ../textadept ../textadeptjit ../textadept-curses \
+ ../textadeptjit-curses | $(basedir)
cp -r $| $@ && cp $^ $@
-$(basedir).i386: ../textadept32 ../textadeptjit32 ../textadept32-ncurses \
- ../textadeptjit32-ncurses | $(basedir)
+$(basedir).i386: ../textadept32 ../textadeptjit32 ../textadept32-curses \
+ ../textadeptjit32-curses | $(basedir)
cp -r $| $@ && cp $^ $@
for t in `ls $@/textadept*`; do mv $$t `echo $$t | sed -e 's/32//;'`; done
$(basedir).win32: ../textadept.exe ../textadeptjit.exe lua51.dll | $(basedir)
@@ -372,8 +372,8 @@ $(basedir).win64: ../textadept64.exe | $(basedir)
for t in `ls $@/textadept*`; do mv $$t `echo $$t | sed -e 's/64\././;'`; done
cp win64gtk/bin/*.dll $@ && cp -r win64gtk/etc win64gtk/lib win64gtk/share $@
rm -r $@/lib/*.a $@/lib/glib-2.0 $@/lib/gtk-2.0/include $@/lib/pkgconfig
-$(basedir).osx: ../textadept.osx ../textadeptjit.osx ../textadept-ncurses.osx \
- ../textadeptjit-ncurses.osx | $(basedir)
+$(basedir).osx: ../textadept.osx ../textadeptjit.osx ../textadept-curses.osx \
+ ../textadeptjit-curses.osx | $(basedir)
mkdir $@ && cp -rL gtkosx/app $@/Textadept.app
cp $^ $@/Textadept.app/Contents/MacOS/
cp -rL $|/* $@/Textadept.app/Contents/Resources/
diff --git a/src/textadept.c b/src/textadept.c
index e0cc5bf3..adc9469e 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -12,9 +12,9 @@
#elif _WIN32
#include <windows.h>
#define main main_
-#elif (__APPLE__ && !NCURSES)
+#elif (__APPLE__ && !CURSES)
#include <gtkmacintegration/gtkosxapplication.h>
-#elif (__APPLE__ && NCURSES)
+#elif (__APPLE__ && CURSES)
#include <mach-o/dyld.h>
#elif (__FreeBSD__ || __NetBSD__ || __OpenBSD__)
#define u_int unsigned int // 'u_int' undefined when _POSIX_SOURCE is defined
@@ -23,11 +23,11 @@
#endif
#if GTK
#include <gtk/gtk.h>
-#elif NCURSES
+#elif CURSES
#include <signal.h>
#include <sys/ioctl.h>
#include <termios.h>
-#include <ncurses.h>
+#include <curses.h>
#include "cdk_int.h"
#endif
@@ -39,7 +39,7 @@
#include "SciLexer.h"
#if GTK
#include "ScintillaWidget.h"
-#elif NCURSES
+#elif CURSES
#include "ScintillaTerm.h"
#include "termkey.h"
#endif
@@ -58,7 +58,7 @@ typedef GtkWidget Scintilla;
#define gtk_combo_box_entry_set_text_column gtk_combo_box_set_entry_text_column
#define GTK_COMBO_BOX_ENTRY GTK_COMBO_BOX
#endif
-#elif NCURSES
+#elif CURSES
#define SS(view, m, w, l) scintilla_send_message(view, m, w, l)
#define focus_view(v) \
SS(focused_view, SCI_SETFOCUS, 0, 0), SS(v, SCI_SETFOCUS, 1, 0)
@@ -72,7 +72,7 @@ static Scintilla *focused_view;
#if GTK
static GtkWidget *window, *menubar, *statusbar[2];
static GtkAccelGroup *accel;
-#if (__APPLE__ && !NCURSES)
+#if (__APPLE__ && !CURSES)
static GtkOSXApplication *osxapp;
#endif
#endif
@@ -89,7 +89,7 @@ static FindButton fnext_button, fprev_button, r_button, ra_button;
static GtkWidget *match_case, *whole_word, *lua_pattern, *in_files;
typedef GtkListStore ListStore;
static ListStore *find_store, *repl_store;
-#elif NCURSES
+#elif CURSES
static CDKSCREEN *findbox = NULL;
static CDKENTRY *find_entry, *replace_entry, *focused_entry;
static char *find_text = NULL, *repl_text = NULL, *flabel = NULL,
@@ -114,14 +114,14 @@ static GtkWidget *command_entry;
#define command_text gtk_entry_get_text(GTK_ENTRY(command_entry))
static GtkListStore *cc_store;
static GtkEntryCompletion *command_entry_completion;
-#elif NCURSES
+#elif CURSES
static CDKENTRY *command_entry = NULL;
static char *command_text = NULL;
#endif
// Lua
static lua_State *lua = NULL;
-#if NCURSES
+#if CURSES
static int quit = FALSE;
#endif
static int closing = FALSE;
@@ -233,7 +233,7 @@ static int a_command_line(GApplication*_, GApplicationCommandLine *cmdline,
#endif
#endif
-#if NCURSES
+#if CURSES
/**
* Frees the given string's current value, if any, and copies the given value to
* it.
@@ -266,7 +266,7 @@ static void find_add_to_history(const char *text, ListStore *store) {
while (gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter))
if (++count > 10) gtk_list_store_remove(store, &iter); // keep 10 items
}
-#elif NCURSES
+#elif CURSES
if (text && (!store[0] || strcmp(text, store[0]) != 0)) {
if (store[9]) free(store[9]);
for (int i = 9; i > 0; i--) store[i] = store[i - 1];
@@ -302,7 +302,7 @@ static int lfind_prev(lua_State *L) {
return (f_clicked(fprev_button, NULL), 0);
}
-#if NCURSES
+#if CURSES
/**
* Signal for a keypress in the Find/Replace Entry.
* For tab keys, toggle through find/replace buttons.
@@ -373,7 +373,7 @@ static int lfind_focus(lua_State *L) {
gtk_widget_grab_focus(focused_view);
gtk_widget_hide(findbox);
}
-#elif NCURSES
+#elif CURSES
if (findbox) return 0; // already active
wresize(scintilla_get_window(focused_view), LINES - 4, COLS);
findbox = initCDKScreen(newwin(2, 0, LINES - 3, 0)), eraseCDKScreen(findbox);
@@ -444,7 +444,7 @@ static int lfind_replace_all(lua_State *L) {
#if GTK
#define toggled(w) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))
-#elif NCURSES
+#elif CURSES
#define toggled(w) w
#endif
/** `find.__index` Lua metatable. */
@@ -472,7 +472,7 @@ static int lfind__index(lua_State *L) {
#define set_label_text(l, t) gtk_label_set_text_with_mnemonic(GTK_LABEL(l), t)
#define set_button_label(b, l) gtk_button_set_label(GTK_BUTTON(b), l)
#define set_option_label(o, _, l) gtk_button_set_label(GTK_BUTTON(o), l)
-#elif NCURSES
+#elif CURSES
#define toggle(w, b) w = b
#define set_label_text(l, t) fcopy(&l, t)
#define set_button_label(b, l) fcopy(&button_labels[b], l)
@@ -492,13 +492,13 @@ static int lfind__newindex(lua_State *L) {
if (strcmp(key, "find_entry_text") == 0)
#if GTK
gtk_entry_set_text(GTK_ENTRY(find_entry), lua_tostring(L, 3));
-#elif NCURSES
+#elif CURSES
fcopy(&find_text, lua_tostring(L, 3));
#endif
else if (strcmp(key, "replace_entry_text") == 0)
#if GTK
gtk_entry_set_text(GTK_ENTRY(replace_entry), lua_tostring(L, 3));
-#elif NCURSES
+#elif CURSES
fcopy(&repl_text, lua_tostring(L, 3));
#endif
else if (strcmp(key, "match_case") == 0)
@@ -533,7 +533,7 @@ static int lfind__newindex(lua_State *L) {
return 0;
}
-#if NCURSES
+#if CURSES
/**
* Signal for a keypress inside the Command Entry.
* As a BINDFN, returns `TRUE` to stop key propagation.
@@ -561,7 +561,7 @@ static int lce_focus(lua_State *L) {
gtk_widget_hide(command_entry);
gtk_widget_grab_focus(focused_view);
}
-#elif NCURSES
+#elif CURSES
if (command_entry) return 0; // already active
CDKSCREEN *screen = initCDKScreen(newwin(1, 0, LINES - 2, 0));
tcsetattr(0, TCSANOW, &term);
@@ -595,7 +595,7 @@ static int lce_show_completions(lua_State *L) {
GtkListStore *store = GTK_LIST_STORE(
gtk_entry_completion_get_model(completion));
gtk_list_store_clear(store);
-#elif NCURSES
+#elif CURSES
const char **items = malloc(len * sizeof(const char *));
int width = 0;
#endif
@@ -606,7 +606,7 @@ static int lce_show_completions(lua_State *L) {
GtkTreeIter iter;
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, lua_tostring(L, -1), -1);
-#elif NCURSES
+#elif CURSES
items[i - 1] = lua_tostring(L, -1);
if (width < strlen(items[i - 1])) width = strlen(items[i - 1]);
#endif
@@ -615,7 +615,7 @@ static int lce_show_completions(lua_State *L) {
}
#if GTK
gtk_entry_completion_complete(completion);
-#elif NCURSES
+#elif CURSES
// Screen needs to take into account border width and scroll bar width.
int height = (len < LINES - 3) ? len : LINES - 5;
CDKSCREEN *screen = initCDKScreen(newwin(height + 2, width + 4,
@@ -646,7 +646,7 @@ static int lce__index(lua_State *L) {
const char *key = lua_tostring(L, 2);
if (strcmp(key, "entry_text") == 0) {
lua_pushstring(L, command_text);
-#if NCURSES
+#if CURSES
if (command_entry) lua_pushstring(L, getCDKEntryValue(command_entry));
#endif
} else lua_rawget(L, 1);
@@ -659,7 +659,7 @@ static int lce__newindex(lua_State *L) {
if (strcmp(key, "entry_text") == 0)
#if GTK
gtk_entry_set_text(GTK_ENTRY(command_entry), lua_tostring(L, 3));
-#elif NCURSES
+#elif CURSES
fcopy(&command_text, lua_tostring(L, 3));
#endif
else
@@ -731,7 +731,7 @@ static int lgui_get_split_table(lua_State *L) {
pane = gtk_widget_get_parent(pane);
l_pushsplittable(L, child1(pane), child2(pane));
} else l_pushview(L, focused_view);
-#elif NCURSES
+#elif CURSES
l_pushview(L, focused_view); // TODO: push split table
#endif
return 1;
@@ -885,7 +885,7 @@ static int lgui_menu(lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
#if GTK
return (l_pushmenu(L, -1, G_CALLBACK(m_clicked), FALSE), 1);
-#elif NCURSES
+#elif CURSES
return (lua_pushnil(L), 1);
#endif
}
@@ -899,7 +899,7 @@ static int lgui__index(lua_State *L) {
gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
lua_pushstring(L, text ? text : "");
if (text) free(text);
-#elif NCURSES
+#elif CURSES
char *text = get_clipboard();
lua_pushlstring(L, text, scintilla_get_clipboard(focused_view, NULL));
free(text);
@@ -908,7 +908,7 @@ static int lgui__index(lua_State *L) {
#if GTK
int width, height;
gtk_window_get_size(GTK_WINDOW(window), &width, &height);
-#elif NCURSES
+#elif CURSES
int width = COLS, height = LINES;
#endif
lua_newtable(L);
@@ -923,7 +923,7 @@ static void set_statusbar_text(const char *text, int bar) {
if (!statusbar[0] || !statusbar[1]) return; // unavailable on startup
gtk_statusbar_pop(GTK_STATUSBAR(statusbar[bar]), 0);
gtk_statusbar_push(GTK_STATUSBAR(statusbar[bar]), 0, text);
-#elif NCURSES
+#elif CURSES
for (int i = ((bar == 0) ? 0 : 20); i < ((bar == 0) ? 20 : COLS); i++)
mvaddch(LINES - 1, i, ' '); // clear statusbar
mvaddstr(LINES - 1, (bar == 0) ? 0 : COLS - strlen(text), text), refresh();
@@ -936,7 +936,7 @@ static int lgui__newindex(lua_State *L) {
if (strcmp(key, "title") == 0) {
#if GTK
gtk_window_set_title(GTK_WINDOW(window), lua_tostring(L, 3));
-#elif NCURSES
+#elif CURSES
for (int i = 0; i < COLS; i++) mvaddch(0, i, ' '); // clear titlebar
mvaddstr(0, 0, lua_tostring(L, 3)), refresh();
#endif
@@ -962,7 +962,7 @@ static int lgui__newindex(lua_State *L) {
gtk_box_pack_start(GTK_BOX(vbox), menubar = new_menubar, FALSE, FALSE, 0);
gtk_box_reorder_child(GTK_BOX(vbox), new_menubar, 0);
gtk_widget_show_all(new_menubar);
-#if (__APPLE__ && !NCURSES)
+#if (__APPLE__ && !CURSES)
gtk_osxapplication_set_menu_bar(osxapp, GTK_MENU_SHELL(new_menubar));
gtk_widget_hide(new_menubar);
#endif
@@ -1318,7 +1318,7 @@ static int lquit(lua_State *L) {
#if GTK
GdkEventAny event = { GDK_DELETE, gtk_widget_get_window(window), TRUE };
gdk_event_put((GdkEvent *)(&event));
-#elif NCURSES
+#elif CURSES
quit = true;
#endif
return 0;
@@ -1347,7 +1347,7 @@ static int lL_dofile(lua_State *L, const char *filename) {
GTK_BUTTONS_OK, "%s\n",
lua_tostring(L, -1));
gtk_dialog_run(GTK_DIALOG(dialog)), gtk_widget_destroy(dialog);
-#elif NCURSES
+#elif CURSES
WINDOW *win = newwin(0, 0, 1, 0);
wprintw(win, lua_tostring(L, -1)), wrefresh(win);
getch(), delwin(win);
@@ -1396,7 +1396,7 @@ static int ltimeout(lua_State *L) {
for (int i = 2; i <= n; i++)
lua_pushvalue(L, i), refs[i - 2] = luaL_ref(L, LUA_REGISTRYINDEX);
g_timeout_add(timeout * 1000, emit_timeout, (void *)refs);
-#elif NCURSES
+#elif CURSES
luaL_error(L, "not implemented in this environment");
#endif
return 0;
@@ -1517,15 +1517,15 @@ static int lL_init(lua_State *L, int argc, char **argv, int reinit) {
lua_pushstring(L, textadept_home), lua_setglobal(L, "_HOME");
#if _WIN32
lua_pushboolean(L, 1), lua_setglobal(L, "WIN32");
-#elif (__APPLE__ && !NCURSES)
+#elif (__APPLE__ && !CURSES)
lua_pushboolean(L, 1), lua_setglobal(L, "OSX");
-#elif NCURSES
- lua_pushboolean(L, 1), lua_setglobal(L, "NCURSES");
+#elif CURSES
+ lua_pushboolean(L, 1), lua_setglobal(L, "CURSES");
#endif
const char *charset = NULL;
#if GTK
g_get_charset(&charset);
-#elif NCURSES
+#elif CURSES
charset = getenv("CHARSET");
if (!charset || !*charset) {
char *locale = getenv("LC_ALL");
@@ -1651,7 +1651,7 @@ static int unsplit_view(Scintilla *view) {
gtk_widget_grab_focus(GTK_WIDGET(view));
g_object_unref(view), g_object_unref(other);
return TRUE;
-#elif NCURSES
+#elif CURSES
return FALSE;
#endif
}
@@ -1688,7 +1688,7 @@ static int w_exit(GtkWidget*_, GdkEventAny*__, void*___) {
return FALSE;
}
-#if (__APPLE__ && !NCURSES)
+#if (__APPLE__ && !CURSES)
/**
* Signal for opening files from OSX.
* Generates an 'appleevent_odoc' event for each document sent.
@@ -1873,7 +1873,7 @@ static void split_view(Scintilla *view, int vertical) {
SS(view2, SCI_SETSEL, anchor, current_pos);
int new_first_line = SS(view2, SCI_GETFIRSTVISIBLELINE, 0, 0);
SS(view2, SCI_LINESCROLL, first_line - new_first_line, 0);
-#elif NCURSES
+#elif CURSES
// TODO: split.
#endif
}
@@ -1902,7 +1902,7 @@ static int lview__index(lua_State *L) {
int pos = gtk_paned_get_position(GTK_PANED(gtk_widget_get_parent(view)));
lua_pushinteger(L, pos);
} else lua_pushnil(L);
-#elif NCURSES
+#elif CURSES
lua_pushnil(L); // TODO: push size
#endif
} else lua_rawget(L, 1);
@@ -1920,7 +1920,7 @@ static int lview__newindex(lua_State *L) {
int size = luaL_checkinteger(L, 3);
if (size < 0) size = 0;
if (GTK_IS_PANED(pane)) gtk_paned_set_position(GTK_PANED(pane), size);
-#elif NCURSES
+#elif CURSES
// TODO: set size.
#endif
} else lua_rawset(L, 1);
@@ -1964,7 +1964,7 @@ static Scintilla *new_view(sptr_t doc) {
signal(view, "command", s_command);
signal(view, "key-press-event", s_keypress);
signal(view, "button-press-event", s_buttonpress);
-#elif NCURSES
+#elif CURSES
Scintilla *view = scintilla_new(s_notify);
#endif
SS(view, SCI_USEPOPUP, 0, 0);
@@ -2128,7 +2128,7 @@ static void new_window() {
gtdialog_set_parent(GTK_WINDOW(window));
accel = gtk_accel_group_new();
-#if (__APPLE__ && !NCURSES)
+#if (__APPLE__ && !CURSES)
gtk_osxapplication_set_use_quartz_accelerators(osxapp, FALSE);
osx_signal(osxapp, "NSApplicationOpenFile", w_open_osx);
osx_signal(osxapp, "NSApplicationBlockTermination", w_exit_osx);
@@ -2182,14 +2182,14 @@ static void new_window() {
gtk_widget_hide(menubar); // hide initially
gtk_widget_hide(findbox); // hide initially
gtk_widget_hide(command_entry); // hide initially
-#elif NCURSES
+#elif CURSES
Scintilla *view = new_view(0);
wresize(scintilla_get_window(view), LINES - 2, COLS);
mvwin(scintilla_get_window(view), 1, 0);
#endif
}
-#if NCURSES
+#if CURSES
/** Signal for a terminal resize. */
static void resize(int signal) {
struct winsize win;
@@ -2211,7 +2211,7 @@ static void resize(int signal) {
int main(int argc, char **argv) {
#if GTK
gtk_init(&argc, &argv);
-#elif NCURSES
+#elif CURSES
static struct termios oldterm;
tcgetattr(0, &oldterm); // save old terminal settings
TermKey *tk = termkey_new(0, TERMKEY_FLAG_NOTERMIOS);
@@ -2230,13 +2230,13 @@ int main(int argc, char **argv) {
textadept_home = malloc(FILENAME_MAX);
GetModuleFileName(0, textadept_home, FILENAME_MAX);
if ((last_slash = strrchr(textadept_home, '\\'))) *last_slash = '\0';
-#elif (__APPLE__ && !NCURSES)
+#elif (__APPLE__ && !CURSES)
osxapp = g_object_new(GTK_TYPE_OSX_APPLICATION, NULL);
char *path = quartz_application_get_resource_path();
textadept_home = g_filename_from_utf8((const char *)path, -1, NULL, NULL,
NULL);
g_free(path);
-#elif (__APPLE__ && NCURSES)
+#elif (__APPLE__ && CURSES)
char *path = malloc(FILENAME_MAX), *p = NULL;
uint32_t size = FILENAME_MAX;
_NSGetExecutablePath(path, &size);
@@ -2271,7 +2271,7 @@ int main(int argc, char **argv) {
if (lua = luaL_newstate(), !lL_init(lua, argc, argv, FALSE)) return 1;
new_window();
lL_dofile(lua, "init.lua");
-#if (__APPLE__ && !NCURSES)
+#if (__APPLE__ && !CURSES)
gtk_osxapplication_ready(osxapp);
#endif
@@ -2283,7 +2283,7 @@ int main(int argc, char **argv) {
#else
gtk_main();
#endif
-#elif NCURSES
+#elif CURSES
scintilla_refresh(focused_view);
stderr = freopen("/dev/null", "w", stderr); // redirect stderr