Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
* terminal resizing must be enabled explicitly
* endwin() does not work as expected, so don't use it
* messages may always be sent to stdout/stderr
* patching Scinterm was necessary: it did not expect COLORS > 8. will still build
with unpatched versions
|
|
|
|
* there might be curses implementations that don't support KEY_RESIZE at all
* PDCurses does but only with the X11 and SDL versions
* on Windows, the console version might use the SDL DLL (by replacing
pdcurses.dll) so it's fair to keep the window resizing code compiled into
the binary.
* also it's necessary to call resize_term() to update internal structures
* should also work with the Win32a port of PDCurses
|
|
|
|
* as always, link order is relevant
* PDCurses is default curses on Windows
* use BSD headers from compat/
* detect OS automatically using uname
|
|
* profile is called "teco.ini" under Windows
|
|
* mainly we need a custom get_absolute_path() function using Win32 API
* also the windows.h conflicts with some other headers (esp. BSD headers)
* also there was a typo in the code setting file attributes
|
|
standard curses implementation on Windows (MinGW32)
* may also be used on Unix, to build X11 versions using XCurses
* cannot do the avoid-screen-refresh thing on PDCurses
|
|
|
|
radix from/to the buffer
* uncommon radices are allowed but reading stops on non-alphanumeric characters (and characters on allowed by the current radix)
|
|
displayed for longer running munged macros)
|
|
it is assumed that the undo() function saves the current document's DOT
|
|
|
|
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
|
|
|
|
directory
* on Windows, it might still be a good idea to use the "config" directory (have to test it)
|
|
|
|
|
|
|
|
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)
|
|
stack given a single character
|
|
|
|
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)
|
|
as l-values (common use case)
|
|
* 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)
|
|
|
|
undoing hook
|
|
|
|
|
|
* rubout is quite tricky but ensures minimal memory copying
|
|
* teco.ini updated as well
|
|
stack otherwise pass string
|
|
|
|
features
|
|
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
|
|
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
|
|
|
|
Q-Register is (temporarily) edited without changing the current document
|
|
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
|
|
this is very similar to setting a string
|
|
|
|
|
|
* 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
|
|
|