diff options
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -169,6 +169,7 @@ StateStart::StateStart() : State() transitions['!'] = &states.label; transitions['^'] = &states.control; + transitions['E'] = &states.ecommand; transitions['I'] = &states.insert; } @@ -552,6 +553,28 @@ StateControl::custom(gchar chr) return &states.start; } +StateECommand::StateECommand() : State() +{ + transitions['\0'] = this; +} + +State * +StateECommand::custom(gchar chr) +{ + switch (g_ascii_toupper(chr)) { + case 'X': + BEGIN_EXEC(&states.start); + undo.push_var<bool>(quit_requested); + quit_requested = true; + break; + + default: + return NULL; + } + + return &states.start; +} + /* * NOTE: cannot support VideoTECO's <n>I because * beginning and end of strings must be determined |