diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-12-04 04:06:45 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-12-04 04:06:45 +0100 |
commit | 575c9f45ec0f338e1d22032b98773d3ff3386bc9 (patch) | |
tree | db0362ce6f69d2a18ec6e94ad6889254050f1eae /search.h | |
parent | 457fe1498d5fe88e0447ddecd617281f7afd3304 (diff) | |
download | sciteco-575c9f45ec0f338e1d22032b98773d3ff3386bc9.tar.gz |
search-replace command with default replacement string (FR)
* based on FS command
* default replacement string is stored in global register "-"
Diffstat (limited to 'search.h')
-rw-r--r-- | search.h | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -52,7 +52,7 @@ class StateReplace : public StateSearch { public: StateReplace() : StateSearch(false) {} -private: +protected: State *done(const gchar *str) throw (Error); }; @@ -61,11 +61,24 @@ private: void initial(void) throw (Error) {} }; +class StateReplaceDefault : public StateReplace { +private: + State *done(const gchar *str) throw (Error); +}; + +class StateReplaceDefault_insert : public StateInsert { +private: + void initial(void) throw (Error) {} + State *done(const gchar *str) throw (Error); +}; + namespace States { - extern StateSearch search; - extern StateSearchAll searchall; - extern StateReplace replace; - extern StateReplace_insert replace_insert; + extern StateSearch search; + extern StateSearchAll searchall; + extern StateReplace replace; + extern StateReplace_insert replace_insert; + extern StateReplaceDefault replacedefault; + extern StateReplaceDefault_insert replacedefault_insert; } #endif |