Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Buffer ring part (ring.cpp)
|
|
* like the other search-related commands the operation (delete, kill, replace) is not performed until the
search pattern string argument is terminated (simplifies implementation and has visual advantages)
|
|
* new base for searc-replace command states
|
|
* based on FS command
* default replacement string is stored in global register "-"
|
|
* makes use of Scintilla selections, so their usage has been improved
* search commands preserve selection on termination (escape)
* selections are restored on rubout
* search-replace command makes use of the Insert command's state (may serve as a base class now)
but does not pop additional values from stack (like "I" does)
|
|
|
|
|
|
order
* also inverse ranges are now supported (<a,b>S if a>b) and result in constrained backward searches
|
|
* new syntax is <[lParam,[wParam,[msg]]]>ES[msg[,wParam[,lParam]]]$[lParam string]$
* symbols are matched case-insensitive, the leading SCI_ for message symbols may be omitted
* added support for more multiple string arguments (for commands in general)
* fixed "C conditional: succeeds for every alpanumeric character, dot, dollar or underscore
* added SCLEX_ and SCE_ constants as symbols
* updated teco.ini: using symbolic names is preferred since that way code does not depend on the current Scintilla version
|
|
radix from/to the buffer
* uncommon radices are allowed but reading stops on non-alphanumeric characters (and characters on allowed by the current radix)
|
|
|
|
classic TECO's append-buffer command is not supported
* currently, num_sign is implied for A, that is -A will retrieve the value before DOT, while "A" will retrieve after (not at) DOT
|
|
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)
|
|
Execute::macro()
|
|
* 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)
|
|
* on the command line the line terminating <ESC> is not accepted when a label was not found
|
|
|
|
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
|
|
matching *balanced* "}"
this eases writing nested macros
|
|
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)
|
|
* rubout is quite tricky but ensures minimal memory copying
|
|
* teco.ini updated as well
|
|
stack otherwise pass string
|
|
|
|
features
|
|
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
|
|
|
|
* also added some additional range checks (e.g. X command)
|
|
the current file / any file is dirty (modified)
-EF and -EX may be used to enforce a close/quit without saving
|
|
|
|
* will support Scintilla with Scinterm/NCurses
* changes are in such a way that the generated machine code should have almost no overhead compared
to the previous implementation (at least when compiled with optimizations)
|
|
|
|
|
|
|
|
can be rubbed out!!!
this works because when a buffer is closed, it is not deallocated but transferred to the undo
token object which then (if run) reinserts it into the ring list. if the undo token is destroyed
before it is run (eg. <ESC><ESC> pressed), the buffer will finally be deallocated.
|
|
based on Scintilla editor key commands, so they will automatically adopt to Scintilla setting changes
|
|
|
|
* EW$ saves file with its current filename
* EW<filename>$ saves file with under the specified filename (Save As)
* files are stored with absolute paths in the ring
|
|
|
|
|
|
|
|
|
|
0 in <n>S...$
* the requested number of occurrences is usually much smaller than the number of bytes in the document
* still, (n) can be arbitrarily large, so allocate that stack
|
|
currently get very large)
|
|
|
|
branching in conditionals
e.g. <0"=1;'...do something...> now works as expected
|
|
in parse only mode
|
|
ADD; fixed num_sign (unary minus) handling
|
|
option processing, unhandled commandline options in default buffer
|