aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-19 22:12:16 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-11-20 06:07:33 +0100
commit90f203bff189706c2dec34482475b89d0a232597 (patch)
treea13c16ca7f73b779f941e0543bcff81d97e84b4d /main.cpp
parentb804417f36ef398f1223e439fd5ac9f2ade046eb (diff)
downloadsciteco-90f203bff189706c2dec34482475b89d0a232597.tar.gz
make goto tables local to macro invocation: they are declared on the C++ callstack since macro invocations result in nested macro_execute() calls
otherwise a macro could set labels with program counters which are invalid in other macros/the command line
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index e186171..a1da02d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -100,6 +100,8 @@ process_options(int &argc, char **&argv)
int
main(int argc, char **argv)
{
+ static GotoTable cmdline_goto_table;
+
process_options(argc, argv);
interface.ssm(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK);
@@ -134,8 +136,8 @@ main(int argc, char **argv)
}
g_free(mung_file);
+ goto_table = &cmdline_goto_table;
interface.ssm(SCI_EMPTYUNDOBUFFER);
- goto_table_clear();
undo.enabled = true;
interface.event_loop();