From a165844bc804999809d794d83fdec5f1575a4492 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 1 Aug 2012 14:06:58 -0400 Subject: Disable showing help in ncurses; core/args.lua Lua 'print' statements do not work properly once ncurses has been initialized and there is no way to print to a buffer without overwriting an existing session on exit. --- core/args.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/args.lua b/core/args.lua index 46ea7769..687735ce 100644 --- a/core/args.lua +++ b/core/args.lua @@ -65,14 +65,14 @@ function M.process(arg) if no_args then events.emit('arg_none') end end --- Shows all registered command line switches in a help dialog. +-- Shows all registered command line switches on the command line. local function show_help() print('Usage: textadept [args] [filenames]') local line = " %s [%d args]: %s" for k, v in pairs(switches) do print(line:format(k, table.unpack(v, 2))) end os.exit() end -M.register('-h', '--help', 0, show_help, 'Displays this') +if not NCURSES 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 -- cgit v1.2.3