Age | Commit message (Collapse) | Author | Files | Lines |
|
* After re-benchmarking the performance, I in fact detected a 20-25% speedup if
memory limiting is active. Both using `time` and the builtin monotic timer ::^B.
When memory limiting is disabled, there is no detectable difference to jemalloc.
The following test case was used:
sciteco -e '::^BUs 100000<@^U[^E\a]"^E\a" %a> ::^B-Qs='
* I also played around with getrusage(), but it doesn't seem to be a viable
API for detecting the currently used RSS, i.e. it does not allow recovering
from OOMs.
|
|
$$ into the commandline
|
|
support the append operation (:Xq, :^Uq...)
Works via a default implementation in the "external" Q-register "class"
by first querying the string, appending and re-setting it.
|
|
* regression introduced in 2baa14add6d9976c29b27cf4470bb458a0198694
|
|
* In this case we always save the given buffer and never the current Q-Register.
* The current Q-Register is only saved without any numeric argument.
The same semantics make sense for <EF> so that Q*EF closes the current buffer
even when editing a Q-Register.
* This variant is present in Video TECO.
|
|
* Added some keywords.
* Consistently added command variants with all modifiers.
In principle including modifiers in the topics is unnecessary -
you can always strip the modifiers and look up the raw command.
However, looking up a command with modifiers can speed up the process
(compare looking up ?S<TAB> vs ?::S<TAB>
* The `@` modifier is listed only for commands without string arguments.
|
|
* While it doesn't directly change the buffer's contents in bytes,
a subsequent write would result in a different file on disk,
so it is consequent to remind the user of saving or discarding changes.
* Will also fix :EX after changing the EOL mode.
|
|
* Could be used to check whether the stack is currently empty,
although peeking would be cumbersome: `:]q"S [q !...! | !...! '`
* This is from DEC TECO-11.
|
|
* `static const char *p = "FOO"` is not a true constant since
the variable p can still be changed.
It has to be declared as `static const char *const p = "FOO"`,
so that the pointer itself is constant.
* In case of string constants, it's easier however to use `static const char p[] = "FOO"`.
|
|
* These were leaked e.g. in case of end-of-macro errors,
but also in case of syntax highlighting (teco_lexer_style()).
I considered to solve this by overwriting more of the end_of_macro_cb,
but it didn't turn out to be trivial always.
* Considering that the union in teco_machine_main_t saved only 3 machine words
of memory, I decided to sacrifice those for more robust memory management.
* teco_machine_qregspec_t cannot be directly embedded into teco_machine_main_t
due to recursive dependencies with teco_machine_stringbuilding_t.
It could now and should perhaps be allocated only once in teco_machine_main_init(),
but it would require more refactoring.
|
|
* `[q]~` was broken and resulted in crashes since it reset the clipboard character to 0.
In fact, if we don't want to break the `[a]b` idiom we cannot use the numeric cell
of register `~`.
* Therefore we no longer use the numeric part of register `~`.
Once the clipboard registers are initialized they completely replace
any existing register with the same name that may have been
set in the profile.
So we still don't leak any memory.
(But perhaps it would now be better to fail with an error
if one of the clipboard registers already exist?)
* Instead, bit 10 (1024) of ED is now used to change the default
clipboard to the primary selection.
The alternative might have been an EJ flag or even a special register containing
the name of the default clipboard register.
* partially reverses 8c6de6cc718debf44f6056a4c34c4fbb13bc5020
|
|
|
|
Server 2019 has been deprecated.
|
|
* This command exists in Video TECO.
In Video TECO it also supports reading multiple files with a glob pattern -- we do not support that
as I am not convinced of its usefulness.
* teco_view_load() has been extended, so it can read into dot without
discarding the existing document.
|
|
* It continues to default to 67 (C), which is the system clipboard.
But you can now overwrite it e.g. by adding `^^PU~` to the profile.
* This fixes a minor memory leak:
If you set one of the clipboard registers in the profile (initializing
them as plain registers), the clipboard register had been leaked.
The clipboard registers now replace any existing register,
while at the same time preserving the numeric part.
* All remaining Q-Reg table insertions use a new function
teco_qreg_table_insert_unique() which adds an assertion, so that
we notice any future possible memory leaks.
|
|
|
|
* ED hooks are not executed in this case
* <EF> is now allowed even when editing a Q-Reg, unless you try to close the
current buffer
|
|
* It is encoded with the same formula as on VAX/VMS on TECO-11, on TECOC and TECO-64.
* As an extension, when colon-modified it returns the number of seconds since the epoch.
It might be even more useful to return the microseconds since the epoch, but that would require
64-bit integers, which can theoretically be disabled at build time.
|
|
codepoints in a strtoul()-like manner
|
|
* On interfaces, which only support smooth scrolling, we had to emulate
discrete events. Moreover, once we enabled GDK_SMOOTH_SCROLL_MASK,
systems that would previously report discrete UP/DOWN events, would
suddenly report GDK_SCROLL_SMOOTH.
* Converting from smooth scroll events to discrete scroll events
turned out to be trickier than anticipated.
Scrolling was therefore more sluggish than it used to be before
2f448c976889fe60aba8557b5aa4aa0a0d939281.
* Scrolling is therefore now delegated to a GtkEventControllerScroll,
which is used to synthesize a discrete GDK_SCROLL event that's
fed into the usual event pipeline via teco_interface_input_cb().
|
|
* We must call teco_interface_bytes2glyphs() only ever with byte offsets
that already exist in the buffer.
* regression, introduced in aaa1d51a4c85fcc627e88ef7cf5292d9c5f5f840
|
|
* We have to avoid `/*` within comments, so one of the two characters will
have to use a named glyph.
\[**] is actually a special symbol, which wasn't noticed until supporting Unicode.
There is no named glyph for the plain asterisk.
Thus we now use \[sl] to escape the `/` character.
`/\c*` might have also worked.
* grosciteco now supports the `sl` glyph.
|
|
|
|
* PDCurses is practically used only for Windows builds, which only I build presumably,
so it should be okay to bump the version.
* Older PDCurses versions had serious problems like not detecting BUTTONX_RELEASED events.
This was worked around and is fixed now.
Even the Wincon version behaves like ncurses now with regard to mouse events.
* We no longer have to support processing BUTTONX_CLICKED events.
On the downside the mouse mask had to be adapted.
* See also https://github.com/Bill-Gray/PDCursesMod/issues/330
* We also no longer have to call resize_term(0,0).
|
|
This reverts commit 8cc704b897f33d6150156c77202a29222b9ee667.
This is no longer necessary with PDCurses v4.5.1.
Keeping compatibility with old PDCurses versions is not very important
as only I currently build and provide Windows binaries.
Also, the previous workaround decreases usability on PDcurses/wincon even
with a newer PDCurses library.
|
|
* Apparently, we cannot disable smooth scrolling on a per-application basis,
so I have to handle both discrete and smooth scrolling events.
* Since SciTECO's scroll API (-EJ) is based on discrete scrolling, we now
emulate discrete scroll events by accumulating the delta_y of smooth scroll events.
The threshold value of 12 is chosen arbitrarily, but based on an example in
the Gtk documentation.
|
|
* Previously, deleting text after a text match or insertion
could result in wrong ^S/^Y results.
In particular, the amount of characters deleted by <FD> at the end of a buffer
couldn't be queried.
* This also fixes the M#rf (reflow paragraph) macro.
|
|
|
|
Clang static analyzer
There was the possibility that an unitialized value is passed into a got_register_cb().
This could only happen in normal parse mode and it's unlikely to have caused problems in practice
as all callbacks should not rely on qreg being valid in parse-only mode.
This sort of bug would have also been catched by Valgrind.
The rest of the scan-build-reported warnings are bogus
(caused by not being g_auto-aware).
|
|
* This is not in Video TECO, but TECO-11 has a search-and-replace variant of <N>.
<N> however is a search-over-page-boundary command in TECO-11, which has been repurposed
as search-over-buffer-boundary in Video TECO and SciTECO.
* <N> and <FN> no longer call the edit hook after *every* invocation, but only
if the current buffer changes. This is not really relevant with the current
default hook from fallback.teco_ini, but might be depending on the use case.
* Added testcases both for <N> and <FN>.
|
|
from MSYS
Ther rest of mingw32 still appears to exist, though.
|
|
|
|
* The old behavior of throwing an error was inherited from Video TECO.
* The command is now more similar to TECO-11.
* Since -1 is taken, invalid and incomplete UTF-8 byte sequences
are now reported as -2/-3.
I wasn't really able to provoke -3, though.
|
|
command now
* Improves DEC TECO-11 compatibility.
* <EM> is still supported as a synonym, but considered deprecated and is no longer documented.
A warning is printed when invoked.
It can be repurposed at any time in the future.
* `EI$` is not yet supported.
I am unsure whether this makes any sense.
|
|
* Now, `I^P` can replace `EI`.
EI is therefore now free to be repurposed as the new "mung file" command for improved TECO-11 compatibility.
* On the downside when inserting large blocks of TECO code, you will have to write something like
`@I{^P !...! }`
* The construct is also useful when searching for carets as in `S^P^Q^`.
|
|
* This may break existing macros!
^C is now essentially a synonym for $$ and may not terminate the program
when called from a non-toplevel macro frame.
However it improves compatibility with TECO-11.
* In contrast to TECO-11, ^C^C (exit) can be typed completely in upcaret mode.
Otherwise it wouldn't have been possible to use the exit command in ASCII-only scripts.
* The implementation of ^C^C uses a lookahead state similar to ^[ (escape).
^C does not return immediately, but the following character determines whether it will
perform a return or exit.
It's one of the rare cases in SciTECO where this is possible and safe since
^C is also disallowed on the command-line to avoid undesired command-line terminations
after ^C interruptions.
(You can only use $$ to terminate the command-line interactively.)
|
|
It is no longer in the tarballs, so there is no need to document the license.
|
|
* Any value left on the numeric stack now determines the exit code.
This ensures you can call n^C as the SciTECO version of exit(n).
It will also work with n$$ in the top level macro.
But you don't necessarily need any of these commands.
* Could be useful in shell scripting as in
`sciteco -e "@EB/file/ :@S/foo/\"F1'"` to fail `foo` is not found.
|
|
So you can lookup `?bool$` for instance.
|
|
Also, unterminated strings are highlighted with the "error" color now.
|
|
* Test cases where hard to read since there was a layer of shell and M4 escaping -- sometimes
with the help of quadrigraphs -- to preserve the original TECO characters.
* We introduced TE_CHECK() and TE_CHECK_CMDLINE() M4 macros which care about shell escaping
automatically.
* If all TECO code is double quoted with [[ and ]], single square and round brackets
are preserved as well.
* Only in case of using *unbalanced* single square brackets, you have to take action
and add `![!` or `!]!` TECO comments to balance them out.
This is still better than quadrigraphs.
* The $ESCAPE and $RUBOUT environment variables are replaced by equivalent
M4 macros, so they can be used with TE_CHECK_CMDLINE().
* Other references to shell variables have been resolved by exporting them
into the environment (as in the case of $srcdir) or by introducing
new M4 macros (TE_MAXINTxx, TE_MININTxx).
* The $WORDS_EXAMPLE variable has been got rid of by writing it into a temporary
file instead. There is some redundancy -- in principle an M4 macro could have also been used.
* This leaves only 6 remaining usages of AT_CHECK() for invoking SciTECO,
mainly for testing opener.tes, where we have to pass in command line arguments.
In theory most of them could be avoided as well by preparing the unnamed buffer appropriately.
However the way that command line parameters are passed will be changed sooner or later.
* This uses GNU M4 extensions, but Autoconf requires that anyway.
|
|
|
|
replacement register (after `{`)
I found that terminating the command-line while editing the replacement register,
leaves you in a hard-to-recover state. You can/should no longer call `}`, so you would
have to go back to the last buffer (Q*U*).
Instead, this is now checked against and a test case has also been added.
|
|
* When popping from the Q-Register stack to local Q-Registers in macro calls,
problems would arise when rubbing out that macro call since we would eventually restore
a pointer that has been permanently freed along with the local Q-Registers.
* Naturally this could result in everything from Valgrind warnings to crashes.
* Added test case.
* There is still a test case that fails when run under `--valgrind`,
but it's apparently due to a glib-internal memory leak.
|
|
* This currently folds only {...} string arguments and embedded braces,
most prominently `@^Um{...}` macro definitions..
* Any additional folding for loops and IF-statements should rely on book
keeping by the main parser.
This would also help catch syntactic errors, like dangling IFs.
* We do keep track of the loop nesting, but currently only in execution mode.
* It cannot be disabled via the "fold" property.
Lexers in the container do not have properties.
|
|
The ^KMOUSE macro can also change dot and it was possible
to place dot into invisible areas at the end of the document.
|
|
* Support fold level configuration using `.SCITECO_FOLDLEVEL`.
This sets the current output line as the fold header and all subsequent lines
with the given fold level (until another `.SCITECO_FOLDLEVEL` instruction
is encountered).
* This is now done automatically for man's SH and SS macros,
so the man-page based woman pages provide folding.
* The folding margin is therefore now always enabled in fallback.teco_ini.
|
|
|
|
|
|
* After detecting +line[,column] constructs, the next argument is not parsed as a potential
filename:line[:column] construct.
* This code turned out to be tricky to get right, so I added a test case.
Standard library modules can well be checked in the test suite since
we have $SCITECOPATH pointing to the source tree's lib/ directory.
* Make sure that relevant variables from atlocal.in are really exported into the
process environment.
This was also broken for the Glib debug options.
|