diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-01-23 18:44:26 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2013-01-23 18:44:26 +0100 |
commit | 4c37f988b68b35d2510de25a185e091e692d00d5 (patch) | |
tree | 9f8ee521d244f7d56f8646db964fc337ca1dce93 /src/parser.cpp | |
parent | aea39acc84741eb2fa868865e9fdc0395fa94478 (diff) | |
download | sciteco-4c37f988b68b35d2510de25a185e091e692d00d5.tar.gz |
implemented special save last commandline command ("*" at beginning of commandline macro)
* only works as part of commandline macro,
* at the beginning of other macros, it is treated like an arithmetic asterisk
* variables defined in cmdline.cpp are now declared by new cmdline.h
Diffstat (limited to 'src/parser.cpp')
-rw-r--r-- | src/parser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 48e7d5f..4d0c6b5 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -36,6 +36,7 @@ #include "parser.h" #include "symbols.h" #include "search.h" +#include "cmdline.h" //#define DEBUG @@ -650,6 +651,10 @@ StateStart::custom(gchar chr) throw (Error) break; case '*': + if (!g_strcmp0(cmdline, "*")) + /* special save last commandline command */ + return &States::save_cmdline; + BEGIN_EXEC(this); expressions.push_calc(Expressions::OP_MUL); break; |