aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2012-11-20support :X commandRobin Haberkorn2-2/+31
2012-11-20on UNIX, look for teco.ini in HOME directory instead of the system's config ↵Robin Haberkorn2-5/+11
directory * on Windows, it might still be a good idea to use the "config" directory (have to test it)
2012-11-20mention new teco.ini features in READMERobin Haberkorn1-2/+3
2012-11-20enable linenumbers and folding marks in profileRobin Haberkorn1-2/+5
2012-11-20some reasonable syntax highlighting defaults for C++ and MakeRobin Haberkorn1-8/+42
2012-11-20fixed rubout of macro invocations: goto tables and q-registers are allocated ↵Robin Haberkorn4-36/+80
on the C++ call stack and configured to not emit undo tokens this introduces additional logic but has the huge advantage that the tables can be freed after the macro invocation. if undo tokens were emitted, the tables had to be kept in the undo stack so they can be restored during rubout. this however would be both complicated and unnecessarily inefficient since the tables would reach their initial state during rubout and be deallocated anyways. * similar (but not strictly necessary optimizations) can be performed for macro invocations * also wrapper Q-Register setting/getting -> will allow a custom "*" register getter (e.g. calculates buffer position on the fly)
2012-11-20CHR2STR() macro for common case of constructing an anonymous string on the ↵Robin Haberkorn1-1/+3
stack given a single character
2012-11-20some minor simplifications of the goto codeRobin Haberkorn1-11/+5
2012-11-20cleanup macro execution functions: common namespace, Execute::file() uses ↵Robin Haberkorn6-94/+86
Execute::macro()
2012-11-20local Q-Register tables; :M commandRobin Haberkorn6-110/+201
* 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)
2012-11-20undo.push_var() and undo.push_str() return references so calls can be used ↵Robin Haberkorn1-6/+8
as l-values (common use case)
2012-11-20errors when label cannot be found at end of macro invocationRobin Haberkorn3-0/+17
* on the command line the line terminating <ESC> is not accepted when a label was not found
2012-11-20goto table cleanupRobin Haberkorn6-28/+28
2012-11-20make goto tables local to macro invocation: they are declared on the C++ ↵Robin Haberkorn7-139/+151
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
2012-11-20support special "{" alternate escape character: is only terminated by a ↵Robin Haberkorn3-10/+28
matching *balanced* "}" this eases writing nested macros
2012-11-20disable ^U string building characters (by default)Robin Haberkorn4-19/+28
some method to reenable it will be developed in the future (perhaps using a separate command, or a special modifier which reverses a string commands default handling of building character)
2012-11-20fixed cleaning up red black trees: nodes must be explicitly removedRobin Haberkorn1-2/+4
2012-11-20fixed EB rubout when there is an ADD hook: must not remove buffer before ↵Robin Haberkorn2-9/+4
undoing hook
2012-11-20minor teco.ini simplificationsRobin Haberkorn1-3/+3
2012-11-20some debug output when pushing/popping undo tokensRobin Haberkorn1-0/+11
2012-11-20QRegister push-down stack: [x and ]x commandsRobin Haberkorn4-43/+230
* rubout is quite tricky but ensures minimal memory copying
2012-11-20ED flags making 0-Register hook execution configurableRobin Haberkorn6-9/+95
* teco.ini updated as well
2012-11-20Scintilla command ES accepting string parameter: if empty, pop value from ↵Robin Haberkorn2-15/+31
stack otherwise pass string
2012-11-20cleanup strings[0] before invoking done(): can only be a preliminary solutionRobin Haberkorn2-8/+12
2012-11-20first working draft of syntax highlighting support and related necessary ↵Robin Haberkorn4-32/+57
features
2012-11-18fixed "*" register: instead of trying to update it everywhere the buffer ↵Robin Haberkorn2-35/+67
filename changes, it is implemented as a specialized Q-Register * setting it (^U), is currently ignored * getting it, returns the current file's filename directly * editing it clears its document and resets it with the current file's filename * later dynamic querying of the numeric part of Q-Registers may be implemented as well
2012-11-18avoid using Scintilla's SAVEPOINT mechanism altogether: fixes some ↵Robin Haberkorn4-38/+22
destructive commands * the only thing gained from (partially) using that mechanism is that no explicit calls to set the dirty-status of a buffer are necessary * however it had many disadvantages: * setting the buffer clean had to be done manually anyway (see previous commits) * when changing Q-Registers without affecting the current document, a flag had to be used to prevent setting the current document dirty * last but not least, it introduced a dependency on the order of the destructive operation and its UNDO token. * the UNDO token could trigger a SAVEPOINTLEFT notification resulting in additional rubout tokens to be pushed on the stack which screws the rubout stack. this can be avoided by clever ordering of the operations * using an explicit ring.dirtify() is therefore much better
2012-11-17Q-Register "*" holding the current filenameRobin Haberkorn2-9/+19
2012-11-17use special flag to temporarily disable buffer dirty checks when a ↵Robin Haberkorn3-4/+22
Q-Register is (temporarily) edited without changing the current document
2012-11-17fixed behaviour on runtime errors: the character resulting in the error is ↵Robin Haberkorn1-6/+19
not accepted and all side-effects up to the exception must be reversed if more than one character is inserted (e.g. via <TAB>), insertion stops at the offending character
2012-11-17fixed rubout for loading Q-Registers (with files)Robin Haberkorn2-7/+12
this is very similar to setting a string
2012-11-16avoid some unnecessary jumps to buffer startRobin Haberkorn2-4/+2
2012-11-16scroll caret into view after text insertionRobin Haberkorn1-1/+3
2012-11-16Make sure undo tokens and RB-tree entries are destroyed properlyRobin Haberkorn3-3/+4
* when a pointer to an abstract base class is "deleted", it must have a virtual destructor so the destructor of derived classes is executed * fixes for instance, deletion of save point files when the command line is terminated (undo stack is discarded) * simplified some undotoken code
2012-11-16yet another minor README fixRobin Haberkorn1-1/+1
2012-11-16added some build-time dependenciesRobin Haberkorn1-2/+3
2012-11-16minor README.md fixRobin Haberkorn1-1/+1
2012-11-16README.md for GithubRobin Haberkorn1-0/+57
2012-11-16ensure that infoline is correct on startupRobin Haberkorn1-1/+2
2012-11-16fixed clearing message line: do not display an empty message line (which can ↵Robin Haberkorn6-3/+27
mean an empty line sent to stdout)
2012-11-16changed default scintilla directoryRobin Haberkorn1-1/+1
in the most common setup, it will be found in the parent directory
2012-11-16clear message line after every keypressRobin Haberkorn1-0/+1
2012-11-16support different kinds of runtime errors (using C++ exceptions)Robin Haberkorn7-113/+174
* also added some additional range checks (e.g. X command)
2012-11-16NCURSES interface: fix message displaying in batch mode (avoid any refresh)Robin Haberkorn1-1/+13
2012-11-16file closing must be enforced now (teco.ini)Robin Haberkorn1-1/+1
2012-11-16support EF and EX arguments. FALSE (>= 0) means to refuse closing/exiting if ↵Robin Haberkorn3-0/+24
the current file / any file is dirty (modified) -EF and -EX may be used to enforce a close/quit without saving
2012-11-16NCURSES: simplified notification callback a bitRobin Haberkorn1-4/+2
unfortunately it's currently not possible to use the SCN_UPDATEUI notification to refresh the view only if necessary
2012-11-16empty Scintilla undo buffer on line termination and after mungingRobin Haberkorn2-0/+4
* also clear goto table after munging
2012-11-16keep a buffer dirty flag and display infos about the current buffer in the ↵Robin Haberkorn8-65/+261
interfaces (including the dirty flag) * was a bit tricky because the Scintilla SAVEPOINTS cannot be (fully) used * when a file is loaded or saved, a Scintilla SAVEPOINT is set * SAVEPOINTLEFT notifications are used to set a buffer dirty * SAVEPOINTREACHED notifications are useless since Scintilla does not consider the saves themselves to be undoable * GTK interface displays infos in window title bar * NCURSES interface has also been updated and cleaned up a bit. Infos are displayed in a new info line. * NCURSES: fixed popup display after terminal resizing
2012-11-16define some Autoconf-(config.h)-like PACKAGE_* macrosRobin Haberkorn1-0/+5