aboutsummaryrefslogtreecommitdiffhomepage
path: root/qbuffers.h
AgeCommit message (Collapse)AuthorFilesLines
2012-11-22Windows (MinGW32) compatibility changesRobin Haberkorn1-0/+5
* 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
2012-11-21Gq command to insert Q-Register at current DOTRobin Haberkorn1-0/+6
2012-11-20support :X commandRobin Haberkorn1-0/+9
2012-11-20fixed rubout of macro invocations: goto tables and q-registers are allocated ↵Robin Haberkorn1-3/+35
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-20cleanup macro execution functions: common namespace, Execute::file() uses ↵Robin Haberkorn1-10/+0
Execute::macro()
2012-11-20local Q-Register tables; :M commandRobin Haberkorn1-25/+34
* 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-20disable ^U string building characters (by default)Robin Haberkorn1-0/+2
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 EB rubout when there is an ADD hook: must not remove buffer before ↵Robin Haberkorn1-1/+1
undoing hook
2012-11-20QRegister push-down stack: [x and ]x commandsRobin Haberkorn1-13/+87
* rubout is quite tricky but ensures minimal memory copying
2012-11-20ED flags making 0-Register hook execution configurableRobin Haberkorn1-0/+8
* teco.ini updated as well
2012-11-20first working draft of syntax highlighting support and related necessary ↵Robin Haberkorn1-0/+2
features
2012-11-18fixed "*" register: instead of trying to update it everywhere the buffer ↵Robin Haberkorn1-18/+27
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 Haberkorn1-3/+1
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 Haberkorn1-8/+1
2012-11-17use special flag to temporarily disable buffer dirty checks when a ↵Robin Haberkorn1-0/+2
Q-Register is (temporarily) edited without changing the current document
2012-11-17fixed rubout for loading Q-Registers (with files)Robin Haberkorn1-0/+5
this is very similar to setting a string
2012-11-16support different kinds of runtime errors (using C++ exceptions)Robin Haberkorn1-12/+12
* also added some additional range checks (e.g. X command)
2012-11-16support EF and EX arguments. FALSE (>= 0) means to refuse closing/exiting if ↵Robin Haberkorn1-0/+2
the current file / any file is dirty (modified) -EF and -EX may be used to enforce a close/quit without saving
2012-11-16keep a buffer dirty flag and display infos about the current buffer in the ↵Robin Haberkorn1-1/+9
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-15replaced remaining editor_msg() references with new Interface::ssm()Robin Haberkorn1-10/+11
2012-11-14support rubout for EW command: if in undo mode, a save point is created so ↵Robin Haberkorn1-1/+21
the file can be replaced or removed when rubbing out EW
2012-11-13EF command to close a bufferRobin Haberkorn1-1/+22
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.
2012-11-13try to canonicalize paths to non-existent filesRobin Haberkorn1-1/+2
allows you to edit non-existing files with a predefined name. it is completely canonicalized when it is saved
2012-11-13added EW...$ commandRobin Haberkorn1-12/+26
* 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
2012-11-13added support for string match characters (match spec to regexp compiler)Robin Haberkorn1-0/+5
2012-11-13fixed undoing of setting Q-Register stringRobin Haberkorn1-0/+1
2012-11-11<x,y>Xq command, automatic profile munging, explicit munging, commandline ↵Robin Haberkorn1-0/+6
option processing, unhandled commandline options in default buffer
2012-11-11support for Qx, Ux, %x and Mx commandsRobin Haberkorn1-5/+30
* Mx does not yet use local Q-registers
2012-11-11^Ux...$ command: rubout does not yet work properlyRobin Haberkorn1-3/+17
2012-11-11support EQx<filename>$ command: load filename into Q register without ↵Robin Haberkorn1-0/+8
changing the current buffer
2012-11-11Q-Register table and EQx commandRobin Haberkorn1-1/+100
2012-11-10use namespace "States" instead of "states" structureRobin Haberkorn1-0/+4
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
2012-11-10support 0EB...$ commandRobin Haberkorn1-1/+15
* same as EB...$, but displays the buffer ring in the filename popup with the current file highlighted immediately after the EB
2012-11-10filename autocompletion using <CTRL/T> and <TAB>Robin Haberkorn1-0/+10
* <TAB> autocompletion only in specified states * GtkInfoPopup widget to display possible completions, written using Gob2
2012-11-08support globbing in EB...$ to support opening multiple files at onceRobin Haberkorn1-0/+2
2012-11-08added buffer ring and preliminary EB...$ implementationRobin Haberkorn1-0/+122
* undoing supported * does not yet support globbing