aboutsummaryrefslogtreecommitdiffhomepage
path: root/search.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-04 04:06:45 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-04 04:06:45 +0100
commit575c9f45ec0f338e1d22032b98773d3ff3386bc9 (patch)
treedb0362ce6f69d2a18ec6e94ad6889254050f1eae /search.h
parent457fe1498d5fe88e0447ddecd617281f7afd3304 (diff)
downloadsciteco-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.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/search.h b/search.h
index 46e37e2..beb20d4 100644
--- a/search.h
+++ b/search.h
@@ -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