diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-20 00:43:18 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-20 06:07:34 +0100 |
commit | ec510eda5f080d39906c396a36cba89188031640 (patch) | |
tree | f47468059f71cadb84a0699876310d0f1373411e /main.cpp | |
parent | 9e49e88d0cc3e6336754040eeaab7a760645dd79 (diff) | |
download | sciteco-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.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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) { |