From 4c37f988b68b35d2510de25a185e091e692d00d5 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 23 Jan 2013 18:44:26 +0100 Subject: 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 --- src/parser.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/parser.cpp') 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; -- cgit v1.2.3