From 457fe1498d5fe88e0447ddecd617281f7afd3304 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 4 Dec 2012 03:15:24 +0100 Subject: search and replace command (FS) * makes use of Scintilla selections, so their usage has been improved * search commands preserve selection on termination (escape) * selections are restored on rubout * search-replace command makes use of the Insert command's state (may serve as a base class now) but does not pop additional values from stack (like "I" does) --- parser.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'parser.h') diff --git a/parser.h b/parser.h index ab0e381..4ae9db6 100644 --- a/parser.h +++ b/parser.h @@ -180,9 +180,9 @@ private: State *custom(gchar chr) throw (Error); }; -class StateFlowCommand : public State { +class StateFCommand : public State { public: - StateFlowCommand(); + StateFCommand(); private: State *custom(gchar chr) throw (Error); @@ -217,8 +217,11 @@ private: State *done(const gchar *str) throw (Error); }; +/* + * also serves as base class for replace-insertion states + */ class StateInsert : public StateExpectString { -private: +protected: void initial(void) throw (Error); void process(const gchar *str, gint new_chars) throw (Error); State *done(const gchar *str) throw (Error); @@ -227,7 +230,7 @@ private: namespace States { extern StateStart start; extern StateControl control; - extern StateFlowCommand flowcommand; + extern StateFCommand fcommand; extern StateCondCommand condcommand; extern StateECommand ecommand; extern StateScintilla_symbols scintilla_symbols; -- cgit v1.2.3