From 2789e5da50987b908a4aa5758a17c86570d94d63 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sat, 7 Mar 2015 02:45:56 +0100 Subject: cleaned up usage of the escape control character: introduced CTL_KEY_ESC and CTL_KEY_ESC_STR * the reason for the CTL_KEY() macro is to get the control character resulting from a CTRL+Key press -- at least this is how SciTECO presents these key presses. It is also a macro and may be resolved to a constant expression, so it can be used in switch-case statements. Sometimes it is clearer to use standard C escape sequences (like '\t'). * CTL_KEY('[') for escape is hard to read, so I always used '\x1B' which is even more cryptic. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index ea192db..ed054d7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -338,7 +338,7 @@ main(int argc, char **argv) * If munged file didn't quit, switch into interactive mode */ /* commandline replacement string register */ - QRegisters::globals.insert("\x1B"); + QRegisters::globals.insert(CTL_KEY_ESC_STR); Goto::table = &cmdline_goto_table; undo.enabled = true; -- cgit v1.2.3