<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco, 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>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>
<entry>
<title>Revert "optimize main state machine transitions with tail calls"</title>
<updated>2026-08-23T20:08:16+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-23T20:08:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=33bab281e27cf866e77fb3bba6e37f5a5edfef03'/>
<id>33bab281e27cf866e77fb3bba6e37f5a5edfef03</id>
<content type='text'>
For yet unknown reasons this does not improve performance on GCC 16
even though it also supports `__attribute__((musttail))`.
As long as I do not understand why, I don't want to risk any
unnecessary problems. I have reason to believe that the tail-call
optimized version still has subtle bugs.

See also the "tail-calls" branch.

This reverts commit 2e097cec409182c3cb39b74489387480bf8a278f.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For yet unknown reasons this does not improve performance on GCC 16
even though it also supports `__attribute__((musttail))`.
As long as I do not understand why, I don't want to risk any
unnecessary problems. I have reason to believe that the tail-call
optimized version still has subtle bugs.

See also the "tail-calls" branch.

This reverts commit 2e097cec409182c3cb39b74489387480bf8a278f.
</pre>
</div>
</content>
</entry>
<entry>
<title>curses/UNIX: improved error handling in teco_interface_{set,get}_clipboard()</title>
<updated>2026-08-23T10:27:44+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-23T10:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6aa97a68a85b83267de597bfb30b70c04b7de97b'/>
<id>6aa97a68a85b83267de597bfb30b70c04b7de97b</id>
<content type='text'>
Now use the teco_spawn_check_wait_status(), which was previously in spawn.c,
so we no longer have to handle the UNIX-specific WEXITSTATUS() macros.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now use the teco_spawn_check_wait_status(), which was previously in spawn.c,
so we no longer have to handle the UNIX-specific WEXITSTATUS() macros.
</pre>
</div>
</content>
</entry>
<entry>
<title>introduced helper functions teco_qreg_table_get_string() and teco_qreg_table_get_integer()</title>
<updated>2026-08-22T22:28:23+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-22T22:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=32122651bdb51006edce2be3586dd09179bed52f'/>
<id>32122651bdb51006edce2be3586dd09179bed52f</id>
<content type='text'>
* Simplifies the common task of querying an integer or string from a Q-Register table.
* Undefined Q-Regs are reported as TECO_ERROR_QREGUNDEF, so you can theoretically
  handle this case. In practice however, it requires less boilerplating to
  just call teco_qreg_table_find() manually.
* It also doesn't make sense to use these functions when getting and setting
  a register at the same time as you will want to avoid repeated lookups.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Simplifies the common task of querying an integer or string from a Q-Register table.
* Undefined Q-Regs are reported as TECO_ERROR_QREGUNDEF, so you can theoretically
  handle this case. In practice however, it requires less boilerplating to
  just call teco_qreg_table_find() manually.
* It also doesn't make sense to use these functions when getting and setting
  a register at the same time as you will want to avoid repeated lookups.
</pre>
</div>
</content>
</entry>
<entry>
<title>optimize main state machine transitions with tail calls</title>
<updated>2026-08-22T20:27:33+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-22T20:27:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=2e097cec409182c3cb39b74489387480bf8a278f'/>
<id>2e097cec409182c3cb39b74489387480bf8a278f</id>
<content type='text'>
* On newer GCC (&gt;= 15) and Clang (&gt;= 13) versions we can tail call
  at the end of input_cb() implementations to the next state's input_cb(),
  which will be optimized to jumps (often direct jumps).
  That is, the compilers always optimized tail calls, but we can
  guarantee tail calls with the __attribute__((musttail)) statement
  attribute.
* Every `return &amp;teco_state_xxx` has to be replaced with
  `TECO_RETURN(ctx, &amp;teco_state_xxx, error)`.
* This speeds up `-O2 -flto` builds by 18%
  (e.g. tested on grosciteco for sciteco(7)).
  Part of the speed up could also be because of inlining through
  TECO_RETURN().
* The other state machines (stringbuilding and q-reg spec) cannot
  currently be optimized the same way since they get their characters
  passed in from the "main" state machine.
* All loops around callbacks could be optimized the same way.
  E.g. the undo token runner could also tail call into the next runner,
  but it's probably not important to optimize undo token executions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* On newer GCC (&gt;= 15) and Clang (&gt;= 13) versions we can tail call
  at the end of input_cb() implementations to the next state's input_cb(),
  which will be optimized to jumps (often direct jumps).
  That is, the compilers always optimized tail calls, but we can
  guarantee tail calls with the __attribute__((musttail)) statement
  attribute.
* Every `return &amp;teco_state_xxx` has to be replaced with
  `TECO_RETURN(ctx, &amp;teco_state_xxx, error)`.
* This speeds up `-O2 -flto` builds by 18%
  (e.g. tested on grosciteco for sciteco(7)).
  Part of the speed up could also be because of inlining through
  TECO_RETURN().
* The other state machines (stringbuilding and q-reg spec) cannot
  currently be optimized the same way since they get their characters
  passed in from the "main" state machine.
* All loops around callbacks could be optimized the same way.
  E.g. the undo token runner could also tail call into the next runner,
  but it's probably not important to optimize undo token executions.
</pre>
</div>
</content>
</entry>
<entry>
<title>don't crash on `0N...$`, but always throw an error</title>
<updated>2026-08-18T19:32:03+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-18T19:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3ae89e34f6a04dd553f3871856521334a4dbe62f'/>
<id>3ae89e34f6a04dd553f3871856521334a4dbe62f</id>
<content type='text'>
See also 8a8edaa2daf37f7c12e21b9199755b5de8e489f5.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See also 8a8edaa2daf37f7c12e21b9199755b5de8e489f5.
</pre>
</div>
</content>
</entry>
<entry>
<title>curses: check for return values of newpad() and newwin()</title>
<updated>2026-08-12T23:04:41+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-12T22:49:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=64c8e378b251669241a3565adf2c8f2d792e1b8d'/>
<id>64c8e378b251669241a3565adf2c8f2d792e1b8d</id>
<content type='text'>
These can fail, so abort() just like glib does internally in case of OOM.
A special case is the pad allocation for autocompletion popups, which
can have excessively many lines. This is handled gracefully now
(the popup simply won't be displayed).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These can fail, so abort() just like glib does internally in case of OOM.
A special case is the pad allocation for autocompletion popups, which
can have excessively many lines. This is handled gracefully now
(the popup simply won't be displayed).
</pre>
</div>
</content>
</entry>
<entry>
<title>LSP: support ctags-lsp</title>
<updated>2026-08-12T23:04:41+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-12T22:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=b24c22dd15c0b02847d105b12e2fde72cb301d7d'/>
<id>b24c22dd15c0b02847d105b12e2fde72cb301d7d</id>
<content type='text'>
* It sends `null` instead of empty lists, even though this is violating the LSP specs.
* Filter out duplicates from the auto-completion lists.
  This may benefit other servers as well.
* ctags-lsp does not fuzzy search for workspace/symbol, so auto-completions
  aren't really a thing.
  The only special case is sending the empty string, which results in
  all symbols being returned. This can be slow, though.
* ctags-lsp does not support textDocument/references, so n:FT$ won't be supported.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* It sends `null` instead of empty lists, even though this is violating the LSP specs.
* Filter out duplicates from the auto-completion lists.
  This may benefit other servers as well.
* ctags-lsp does not fuzzy search for workspace/symbol, so auto-completions
  aren't really a thing.
  The only special case is sending the empty string, which results in
  all symbols being returned. This can be slow, though.
* ctags-lsp does not support textDocument/references, so n:FT$ won't be supported.
</pre>
</div>
</content>
</entry>
<entry>
<title>LSP: ignore not only server notifications but all requests as well</title>
<updated>2026-08-11T20:15:21+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-11T20:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=259678833ad563f43d789c33e5304b2b7c6853cb'/>
<id>259678833ad563f43d789c33e5304b2b7c6853cb</id>
<content type='text'>
* We use 23 now as the "id" for all JSON-RPC requests.
* Every message with a different "id" can be ignored,
  as it is a request, we haven't advertised to support.
  Alternatively, we should perhaps send an error response to
  unexpected requests?
* Fixes support for the ccls server which sends window/workDoneProgress/create
  even though I didn't advertise it.
  ccls cannot practically be used with FTsymbol$ though since it returns
  full declarations.
  You can perform a fuzzy symbol search, though.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* We use 23 now as the "id" for all JSON-RPC requests.
* Every message with a different "id" can be ignored,
  as it is a request, we haven't advertised to support.
  Alternatively, we should perhaps send an error response to
  unexpected requests?
* Fixes support for the ccls server which sends window/workDoneProgress/create
  even though I didn't advertise it.
  ccls cannot practically be used with FTsymbol$ though since it returns
  full declarations.
  You can perform a fuzzy symbol search, though.
</pre>
</div>
</content>
</entry>
<entry>
<title>LSP: save $SCITECO_LSP and $SCITECO_LSP_ROOT as part of buffer sessions</title>
<updated>2026-08-11T19:26:38+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-11T19:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9b904f5b7e9ea45b8ea5991f6eeb19c2f3949874'/>
<id>9b904f5b7e9ea45b8ea5991f6eeb19c2f3949874</id>
<content type='text'>
If you have projects in different languages you can set different LSPs.
The default will still come from ~/.teco_ini if you decide to set one.
The default for $SCITECO_LSP_ROOT is set by session.tes' VCS integration
based on the VCS root, but you could still overwrite it per session.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you have projects in different languages you can set different LSPs.
The default will still come from ~/.teco_ini if you decide to set one.
The default for $SCITECO_LSP_ROOT is set by session.tes' VCS integration
based on the VCS root, but you could still overwrite it per session.
</pre>
</div>
</content>
</entry>
</feed>
