<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src, branch master</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>always check the result of rb3_insert(), i.e. detect collisions in RB trees</title>
<updated>2026-10-15T22:50:48+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-15T22:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=8e4af72622e4a9bb3383085fce28c55444a9d8ee'/>
<id>8e4af72622e4a9bb3383085fce28c55444a9d8ee</id>
<content type='text'>
This was already done for the goto table, but by first looking up
whether a label already exists in the table.
Since the insert operation already reports entries with the same key
in the tree, we should rather check that. This saves one goto table
lookup per label definition, but on the other hand results in excess
allocations in case of encountering a label twice.

In teco_help_set(), we did not check for collisions at all.
Even thouch they are very unlikely, we could encounter them if
a topic is defined on exactly the same position as in
.SCITECO_TOPIC foo
.SCITECO_TOPIC foo
In this case, we leaked memory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was already done for the goto table, but by first looking up
whether a label already exists in the table.
Since the insert operation already reports entries with the same key
in the tree, we should rather check that. This saves one goto table
lookup per label definition, but on the other hand results in excess
allocations in case of encountering a label twice.

In teco_help_set(), we did not check for collisions at all.
Even thouch they are very unlikely, we could encounter them if
a topic is defined on exactly the same position as in
.SCITECO_TOPIC foo
.SCITECO_TOPIC foo
In this case, we leaked memory.
</pre>
</div>
</content>
</entry>
<entry>
<title>help topics no longer need to be unique and can be toggled through with the `?$` command.</title>
<updated>2026-10-13T23:54:14+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-13T23:54:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=8b54d2c31410fcac43c8903007fe0738312834b0'/>
<id>8b54d2c31410fcac43c8903007fe0738312834b0</id>
<content type='text'>
* This mirrors how the `FT$` command toggles through several results.
* Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7).
* This works by inserting non-unique keys into the help topic RB tree - or rather
  by turning filename:pos also into keys since rb3ptr does not allow non-unique keys.
  When searching for a topic, we sort lower than any other entry with the same name.
  This way we can easily iterate all entries with the same name (search topic).
  The alternative would have been to maintain a linked list in each and every
  teco_help_topic_t.
* teco_rb3str_auto_complete() now filters out possible duplicate keys.
* Updated test case: check for non-unique topic names.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This mirrors how the `FT$` command toggles through several results.
* Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7).
* This works by inserting non-unique keys into the help topic RB tree - or rather
  by turning filename:pos also into keys since rb3ptr does not allow non-unique keys.
  When searching for a topic, we sort lower than any other entry with the same name.
  This way we can easily iterate all entries with the same name (search topic).
  The alternative would have been to maintain a linked list in each and every
  teco_help_topic_t.
* teco_rb3str_auto_complete() now filters out possible duplicate keys.
* Updated test case: check for non-unique topic names.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed crashes after `FT...$`</title>
<updated>2026-10-06T22:40:10+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-06T22:40:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=72968dd6c3fbedab848625af86f34be3d537c7b5'/>
<id>72968dd6c3fbedab848625af86f34be3d537c7b5</id>
<content type='text'>
fixup to 5b9ac0d43650bc7a1fe5d6e134e74bda1243fd99.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixup to 5b9ac0d43650bc7a1fe5d6e134e74bda1243fd99.
</pre>
</div>
</content>
</entry>
<entry>
<title>`FT$` now prints "Language server launched" instead of "Nothing found"</title>
<updated>2026-10-04T21:07:47+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-04T20:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5b9ac0d43650bc7a1fe5d6e134e74bda1243fd99'/>
<id>5b9ac0d43650bc7a1fe5d6e134e74bda1243fd99</id>
<content type='text'>
That variant of the command is explicitly used to launch the LSP.
It makes no sense to return an error message in case of success.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That variant of the command is explicitly used to launch the LSP.
It makes no sense to return an error message in case of success.
</pre>
</div>
</content>
</entry>
<entry>
<title>LSP: auto-complete symbols via the textDocument/completion request</title>
<updated>2026-10-04T21:07:47+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-18T23:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e7e539f20c50bd276d63a1c279e2bc8706df8a5c'/>
<id>e7e539f20c50bd276d63a1c279e2bc8706df8a5c</id>
<content type='text'>
This currently only works in insert commands after enabling the immediate
editing modifier via CTRL+G and if the LSP was already launched
(e.g. by an explicit `FT$`).
File name completions are still performed with an activated ^G modifier
only if the LSP is shut down.

Just like for file names, the modifier is automatically cancelled after
a successful completion - there is little sense in completing several
symbols in a row.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This currently only works in insert commands after enabling the immediate
editing modifier via CTRL+G and if the LSP was already launched
(e.g. by an explicit `FT$`).
File name completions are still performed with an activated ^G modifier
only if the LSP is shut down.

Just like for file names, the modifier is automatically cancelled after
a successful completion - there is little sense in completing several
symbols in a row.
</pre>
</div>
</content>
</entry>
<entry>
<title>automatically disable ^G modifier after successful auto-completions</title>
<updated>2026-10-04T20:18:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-04T19:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b'/>
<id>bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b</id>
<content type='text'>
This will be important once we're doing LSP auto-completions.
Until a completion is complete, we do NOT want to disable the modifier however
since otherwise it can be disabled after a partial completion if there happened
to be a rubbed out command line.
Discarding a rubbed out command line consequently no longer disables
the modifier as well.

Any change of the modifier is now logged with an Info-level message.

Some rudimentary test case has been added for rub-in via ^G.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be important once we're doing LSP auto-completions.
Until a completion is complete, we do NOT want to disable the modifier however
since otherwise it can be disabled after a partial completion if there happened
to be a rubbed out command line.
Discarding a rubbed out command line consequently no longer disables
the modifier as well.

Any change of the modifier is now logged with an Info-level message.

Some rudimentary test case has been added for rub-in via ^G.
</pre>
</div>
</content>
</entry>
<entry>
<title>^E at the end of a line in a string argument "swallows" the EOL character</title>
<updated>2026-09-26T22:12:30+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-09-26T22:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e48f1a6b5319224a92a8e7d60cbf5a4098d14ff5'/>
<id>e48f1a6b5319224a92a8e7d60cbf5a4098d14ff5</id>
<content type='text'>
This is similar to `\` at the line end in many languages like C and
allows you to split a very long string argument over several lines without
adding the EOL characters themselves.
The TECO equivalent to `\` would be ^Q, but it would be a semantic exception since
^Q (escaping) is supposed to _preserve_ the value of the following character.
Therefore I decided to use ^E instead.
This works with DOS and Mac line breaks as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is similar to `\` at the line end in many languages like C and
allows you to split a very long string argument over several lines without
adding the EOL characters themselves.
The TECO equivalent to `\` would be ^Q, but it would be a semantic exception since
^Q (escaping) is supposed to _preserve_ the value of the following character.
Therefore I decided to use ^E instead.
This works with DOS and Mac line breaks as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>instead of relying on Scintilla undo actions, use SciTECO undo tokens exclusively</title>
<updated>2026-09-24T23:43:56+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-09-24T23:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e371b5fc710c597e175e6b7d7645b3a224a731a1'/>
<id>e371b5fc710c597e175e6b7d7645b3a224a731a1</id>
<content type='text'>
Previously we were using both Scintilla undo actions and our own undo tokens
and both had to be coordinated via `undo__teco_interface_ssm(SCI_UNDO, 0, 0)`.
This was error prone since we have to predict when an undo action is actually
generated. Furthermore, you had to update SCI_SETUNDOCOLLECTION on all buffers
and the Q-Reg view whenever switching to and from interactive mode.
Also, this probably wasted memory for the doubled undo bookkeeping.
Now, we always set SCI_SETUNDOCOLLECTION(FALSE), even in interactive mode.
teco_undo_view_insert() was introduced to undo text deletions.
While this saves almost no lines of code, it's just a clearer and simpler
architecture.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously we were using both Scintilla undo actions and our own undo tokens
and both had to be coordinated via `undo__teco_interface_ssm(SCI_UNDO, 0, 0)`.
This was error prone since we have to predict when an undo action is actually
generated. Furthermore, you had to update SCI_SETUNDOCOLLECTION on all buffers
and the Q-Reg view whenever switching to and from interactive mode.
Also, this probably wasted memory for the doubled undo bookkeeping.
Now, we always set SCI_SETUNDOCOLLECTION(FALSE), even in interactive mode.
teco_undo_view_insert() was introduced to undo text deletions.
While this saves almost no lines of code, it's just a clearer and simpler
architecture.
</pre>
</div>
</content>
</entry>
<entry>
<title>generate compile_flags.txt</title>
<updated>2026-09-22T22:24:23+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-09-22T22:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=207af96f4eb3220534ea06c2e107517372246544'/>
<id>207af96f4eb3220534ea06c2e107517372246544</id>
<content type='text'>
This can be read by clangd as an alternative to compile_commands.json
(which would be trickier to generate with Autotools).
However, since this is generated in the build directory, it may not always
be picked up automatically -- a build/ directory should work,
but otherwise you might have to pass --compile-commands-dir to clangd.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This can be read by clangd as an alternative to compile_commands.json
(which would be trickier to generate with Autotools).
However, since this is generated in the build directory, it may not always
be picked up automatically -- a build/ directory should work,
but otherwise you might have to pass --compile-commands-dir to clangd.
</pre>
</div>
</content>
</entry>
<entry>
<title>malloc replacement implements free_sized() and free_aligned_sized()</title>
<updated>2026-09-08T22:26:27+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-09-08T22:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a0c46b02aaecef32bfef934e9e38e81a29655eda'/>
<id>a0c46b02aaecef32bfef934e9e38e81a29655eda</id>
<content type='text'>
* These are defined by C23 and jemalloc actually provides them
  beginning with FreeBSD 16.
  Since glib is using free_sized() when available, builds were broken
  on FreeBSD 16.
* Should be backported to the SciTECO 2.5.2 FreeBSD port to
  silence the fallout.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* These are defined by C23 and jemalloc actually provides them
  beginning with FreeBSD 16.
  Since glib is using free_sized() when available, builds were broken
  on FreeBSD 16.
* Should be backported to the SciTECO 2.5.2 FreeBSD port to
  silence the fallout.
</pre>
</div>
</content>
</entry>
</feed>
