aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-20 00:43:18 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-20 06:07:34 +0100
commitec510eda5f080d39906c396a36cba89188031640 (patch)
treef47468059f71cadb84a0699876310d0f1373411e /main.cpp
parent9e49e88d0cc3e6336754040eeaab7a760645dd79 (diff)
downloadsciteco-ec510eda5f080d39906c396a36cba89188031640.tar.gz
local Q-Register tables; :M command
* munged files use the same local Q-Registers as commandline * :M calls macro without new set of local registers (local register names refer to the parent macro level) * only .x names accepted at the moment. for string building characters, this will like stay that way (cannot refer to extended/long names)
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 552b1e0..312064f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -101,6 +101,7 @@ int
main(int argc, char **argv)
{
static GotoTable cmdline_goto_table;
+ static QRegisterTable local_qregs;
process_options(argc, argv);
@@ -116,7 +117,15 @@ main(int argc, char **argv)
interface.ssm(SCI_STYLESETFONT, STYLE_DEFAULT, (sptr_t)"Courier");
interface.ssm(SCI_STYLECLEARALL);
- qregisters.initialize();
+ QRegisters::globals.initialize();
+ /* search string and status register */
+ QRegisters::globals.initialize("_");
+ /* current buffer name and number ("*") */
+ QRegisters::globals.insert(new QRegisterBufferInfo());
+
+ local_qregs.initialize();
+ QRegisters::locals = &local_qregs;
+
ring.edit(NULL);
/* add remaining arguments to unnamed buffer */
@@ -126,7 +135,7 @@ main(int argc, char **argv)
}
if (g_file_test(mung_file, G_FILE_TEST_IS_REGULAR)) {
- if (!file_execute(mung_file))
+ if (!file_execute(mung_file, false))
exit(EXIT_FAILURE);
/* FIXME: make quit immediate in commandline mode (non-UNDO)? */
if (quit_requested) {