diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2017-03-08 12:51:06 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2017-03-08 12:55:06 +0100 |
commit | 0a0d0b7cd9ce2942d5194762478a4e24cd05eca4 (patch) | |
tree | 7201a3c96b350c071aa66ee588ffb6cd0bf5cbd7 /src/parser.h | |
parent | 892248991babb55366860488678632ab4ccdb0ba (diff) | |
download | sciteco-0a0d0b7cd9ce2942d5194762478a4e24cd05eca4.tar.gz |
fixup to 89224899: fixed function key macros after $ and the rubout-command editing key
* StateEscape should return the same fnmacro mask as StateStart
* When rubbing out a command, we should stop at StateEscape as well.
Therefore we reintroduced States::is_start().
RTTI is still not used.
Diffstat (limited to 'src/parser.h')
-rw-r--r-- | src/parser.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h index 700d25f..56e58c4 100644 --- a/src/parser.h +++ b/src/parser.h @@ -300,6 +300,16 @@ private: State *custom(gchar chr); void end_of_macro(void); + + /* + * The state should behave like StateStart + * when it comes to function key macro masking. + */ + fnmacroMask + get_fnmacro_mask(void) const + { + return FNMACRO_MASK_START; + } }; class StateFCommand : public State { @@ -405,6 +415,15 @@ namespace States { extern StateInsertIndent insert_indent; extern State *current; + + static inline bool + is_start(void) + { + /* + * StateEscape should behave very much like StateStart. + */ + return current == &start || current == &escape; + } } extern enum Mode { |