Age | Commit message (Collapse) | Author | Files | Lines |
|
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)
|
|
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
|
|
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
|
|
this is very similar to setting a string
|
|
* 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
|
|
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
|
|
|
|
the file can be replaced or removed when rubbing out EW
|
|
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.
|
|
allows you to edit non-existing files with a predefined name. it is completely canonicalized when it is saved
|
|
* 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
|
|
|
|
|
|
option processing, unhandled commandline options in default buffer
|
|
* Mx does not yet use local Q-registers
|
|
|
|
changing the current buffer
|
|
|
|
has several advantages
* better to read
* namespace can be "extended" from everywhere allowing the declaration of states in the files that implement them
* include file mess could be cleaned up a bit
|
|
* same as EB...$, but displays the buffer ring in the filename popup with the current file highlighted immediately after the EB
|
|
* <TAB> autocompletion only in specified states
* GtkInfoPopup widget to display possible completions, written using Gob2
|
|
|
|
* undoing supported
* does not yet support globbing
|