diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-29 16:46:19 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-29 17:10:03 +0200 |
commit | 95ebb1c7d7969fa642192ce8e6c9efa8249979d9 (patch) | |
tree | 8d768c2116b6ce6d013ff1517a38827eb3fe06b2 /lib/session.tes | |
parent | cbcda49236665b3721ee9c3c66aa4bad08d777b8 (diff) | |
download | sciteco-95ebb1c7d7969fa642192ce8e6c9efa8249979d9.tar.gz |
<:Q> returns -1 for non-existent registers now
* added a new OPTIONAL behaviour for QRegSpecMachines
* allows you to implement commands that have an optional Q-Register
argument that should not be initialized if undefined.
* Using QRegSpecMachine::fail() you may still check for existence of
the register conditionally to emulate the QREG_REQUIRED behaviour.
* Using :Q for checking for register existence makes sense, because
usually you will want to check for both existence and non-emptyness
as in :Qq">. So in this common case, you no longer have to
keep in mind that the register may also be undefined.
* This finally allows us to create arrays in the Q-Register
tables without keeping a separate entry for the number of elements.
E.g. an array.0 to array.N can be iterated like this:
0Ui <:Q[array.^E\i]:; ! work with element i ! %i>
Diffstat (limited to 'lib/session.tes')
-rw-r--r-- | lib/session.tes | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/session.tes b/lib/session.tes index 09bd647..e0bad9e 100644 --- a/lib/session.tes +++ b/lib/session.tes @@ -2,12 +2,12 @@ ! Path of the session profile. Change this to save/load a custom profile. - If empty, no session will be saved. ! + If empty or undefined, no session will be saved. ! EU[session.path]Q[$SCITECOCONFIG]/.teco_session ! Save current session to the file specified by "session.path" ! @[session.save]{ - :Q[session.path]"= Oend ' + :Q[session.path]-1"< Oend ' Q*U.[curbuf] EJ< %.bEB ESGETFIRSTVISIBLELINEU.[fvline] ESGETXOFFSETU.[xoff] .U.[dot] |