<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/cmdline.c, branch v2.5.2</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>fixed scrolling at the end of a multi-line command-line</title>
<updated>2026-02-03T10:48:22+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-02-03T10:48:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a8414b1abb20e35ef7df41e75372b244fe80bebc'/>
<id>a8414b1abb20e35ef7df41e75372b244fe80bebc</id>
<content type='text'>
* You couldn't see the first character on a new line after wrapping
  at the end of a multiline command line.
* This is only worked around. The real reason must be in Scintilla,
  perhaps in a faulty calculation in Editor::MaxScrollPos().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* You couldn't see the first character on a new line after wrapping
  at the end of a multiline command line.
* This is only worked around. The real reason must be in Scintilla,
  perhaps in a faulty calculation in Editor::MaxScrollPos().
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed auto-completion of Unicode file names</title>
<updated>2026-01-18T20:36:56+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-18T20:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3deb2b3970cb344d0c615e9d41a5fe7f3baf1417'/>
<id>3deb2b3970cb344d0c615e9d41a5fe7f3baf1417</id>
<content type='text'>
* teco_string_diff() could return a number of bytes in the middle of
  an Unicode sequence. It now also requires Unicode strings.
* Added a missing Unicode-validity check when replacing command lines (`{` and `}`).
  teco_cmdline_insert() should really be refactored, though (FIXME).
* Added test case
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* teco_string_diff() could return a number of bytes in the middle of
  an Unicode sequence. It now also requires Unicode strings.
* Added a missing Unicode-validity check when replacing command lines (`{` and `}`).
  teco_cmdline_insert() should really be refactored, though (FIXME).
* Added test case
</pre>
</div>
</content>
</entry>
<entry>
<title>updated copyright to 2026</title>
<updated>2026-01-01T06:59:49+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-01-01T06:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c2feb2a6f71fc9adb20226fb3c2260c236e974e0'/>
<id>c2feb2a6f71fc9adb20226fb3c2260c236e974e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>teco_string_t is now passed by value like a scalar if the callee isn't expected to modify it</title>
<updated>2025-12-28T19:57:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-28T15:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ea0a23645f03a42252ab1ce8df45ae4076ebae75'/>
<id>ea0a23645f03a42252ab1ce8df45ae4076ebae75</id>
<content type='text'>
* When passing a struct that should not be modified, I usually use a const pointer.
* Strings however are small 2-word objects and they are often now already passed via separate
  `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well.
  A teco_string_t will usually fit into registers just like a pointer.
* It's now obvious which function just _uses_ and which function _modifies_ a string.
  There is also no chance to pass a NULL pointer to those functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* When passing a struct that should not be modified, I usually use a const pointer.
* Strings however are small 2-word objects and they are often now already passed via separate
  `gchar*` and gsize parameters. So it is consistent to pass teco_string_t by value as well.
  A teco_string_t will usually fit into registers just like a pointer.
* It's now obvious which function just _uses_ and which function _modifies_ a string.
  There is also no chance to pass a NULL pointer to those functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>TECO_DEFINE_STATE() no longer constructs callback names for mandatory callbacks, but tries to use static assertions</title>
<updated>2025-12-26T17:10:42+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-26T17:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c2114fa0af73b42bc1ef302f7511ef87690cc0b1'/>
<id>c2114fa0af73b42bc1ef302f7511ef87690cc0b1</id>
<content type='text'>
* Requiring state callbacks by generating their names (e.g. NAME##_input) has several disadvantages:
  * The callback is not explicitly referenced when the state is defined.
    So an unintroduced reader will see some static function, which is nowhere referenced and still
    doesn't cause "unused" warnings.
  * You cannot choose the name of function that implements the callback freely.
  * In "substates" you need to generate a callback function if you want to provide a default.
    You also need to provide dummy wrapper functions whenever you want to reuse some existing
    function as the implementation.
* Instead, we are now using static assertions to check whether certain callbacks have been
  implemented.
  Unfortunately, this does not work on all compilers. In particular GCC won't consider
  references to state objects fully constant (even though they are) and does not allow
  them in _Static_assert (G_STATIC_ASSERT). This could only be made to work in newer GCC
  with -std=c2x or -std=gnu23 in combination with constexpr.
  It does work on Clang, though.
  So I introduced TECO_ASSERT_SAFE() which also passes if the expression is *not* constant.
  These static assertions are not crucial - they do not check anything that can differ between
  systems. So we can always rely on the checks performed by FreeBSD CI for instance.
  Also, you will of course quickly notice missing callbacks at runtime - with and without
  additional runtime assertions.
* All mandatory callbacks must still be explicitly initialized in the TECO_DEFINE_STATE calls.
* After getting rid of generated callback implementations, the TECO_DEFINE_STATE macros
  can finally be qualified with `static`.
* The TECO_DECLARE_STATE() macro has been removed. It no longer abstracts anything
  and cannot be used to declare static teco_state_t anyway.
  Also TECO_DEFINE_UNDO_CALL() also doesn't have a DECLARE counterpart.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Requiring state callbacks by generating their names (e.g. NAME##_input) has several disadvantages:
  * The callback is not explicitly referenced when the state is defined.
    So an unintroduced reader will see some static function, which is nowhere referenced and still
    doesn't cause "unused" warnings.
  * You cannot choose the name of function that implements the callback freely.
  * In "substates" you need to generate a callback function if you want to provide a default.
    You also need to provide dummy wrapper functions whenever you want to reuse some existing
    function as the implementation.
* Instead, we are now using static assertions to check whether certain callbacks have been
  implemented.
  Unfortunately, this does not work on all compilers. In particular GCC won't consider
  references to state objects fully constant (even though they are) and does not allow
  them in _Static_assert (G_STATIC_ASSERT). This could only be made to work in newer GCC
  with -std=c2x or -std=gnu23 in combination with constexpr.
  It does work on Clang, though.
  So I introduced TECO_ASSERT_SAFE() which also passes if the expression is *not* constant.
  These static assertions are not crucial - they do not check anything that can differ between
  systems. So we can always rely on the checks performed by FreeBSD CI for instance.
  Also, you will of course quickly notice missing callbacks at runtime - with and without
  additional runtime assertions.
* All mandatory callbacks must still be explicitly initialized in the TECO_DEFINE_STATE calls.
* After getting rid of generated callback implementations, the TECO_DEFINE_STATE macros
  can finally be qualified with `static`.
* The TECO_DECLARE_STATE() macro has been removed. It no longer abstracts anything
  and cannot be used to declare static teco_state_t anyway.
  Also TECO_DEFINE_UNDO_CALL() also doesn't have a DECLARE counterpart.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed scrolling the command line after clicking in the popup</title>
<updated>2025-11-21T21:39:01+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-21T21:39:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4aaff7294131552be8c731e2f4d230106a1149f7'/>
<id>4aaff7294131552be8c731e2f4d230106a1149f7</id>
<content type='text'>
We cannot rely on the central teco_cmdline_update() call per keypress
in this case.
The analogous call was removed in 4e6ddd6c329d56055a732c6344df019f0d997aaf,
so this was a recent regression.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We cannot rely on the central teco_cmdline_update() call per keypress
in this case.
The analogous call was removed in 4e6ddd6c329d56055a732c6344df019f0d997aaf,
so this was a recent regression.
</pre>
</div>
</content>
</entry>
<entry>
<title>updated Scintilla: tabs in command lines and SciTECO buffers are now rendered as "TAB" without any indentation</title>
<updated>2025-11-12T00:05:52+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-11T23:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f5ebfce42ded9c146487c02f01f1e335e789084e'/>
<id>f5ebfce42ded9c146487c02f01f1e335e789084e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed the command line's line end type: it was reset during command line replacement ({...})</title>
<updated>2025-11-12T00:05:52+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-11T22:04:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6e006ee0e2d0beedd310218cab1d70cfc71ab154'/>
<id>6e006ee0e2d0beedd310218cab1d70cfc71ab154</id>
<content type='text'>
* The line end type and tab mode is apparently a property of the document.
  Therefore it was lost when exchanging the command line's document during command line replacement.
* Instead, the old command line is now stored in a string.
* During replacement we delete and append only the part of the command line that changed.
  This ensures that we don't have to restyle the entire command line with every single
  replacement (even if it is at the end of the command line).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The line end type and tab mode is apparently a property of the document.
  Therefore it was lost when exchanging the command line's document during command line replacement.
* Instead, the old command line is now stored in a string.
* During replacement we delete and append only the part of the command line that changed.
  This ensures that we don't have to restyle the entire command line with every single
  replacement (even if it is at the end of the command line).
</pre>
</div>
</content>
</entry>
<entry>
<title>updated Scintilla to v5.5.8 and renamed SC_LINE_END_TYPE_HIDDEN to SC_LINE_END_TYPE_NONE</title>
<updated>2025-11-09T21:12:45+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-09T21:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=aac3b99f5026d299dae83cfdab2227074369e916'/>
<id>aac3b99f5026d299dae83cfdab2227074369e916</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>allow configuring the command line height using h,5EJ</title>
<updated>2025-11-09T18:26:37+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-09T18:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=5d7e8df952b2e51c28fad3443d7c9973659fc2ed'/>
<id>5d7e8df952b2e51c28fad3443d7c9973659fc2ed</id>
<content type='text'>
* This allows for several customizations.
  * You can simply increase the visible command line history.
    For that you must also set SCI_SETWRAPMODE(SC_WRAP_CHAR).
    An example was added to fallback.teco_ini.
  * You could also set SCI_SETLINEENDTYPESALLOWED(SC_LINE_END_TYPE_DEFAULT)
    to see the structure of inserted text.
* Alternatively we could have introduced a new command like EP or FW
  and also overload it to replace the current ED&amp;2048 (e.g. -EP and EP).
  In DEC TECO `W` comes closest to what 5EJ now does.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This allows for several customizations.
  * You can simply increase the visible command line history.
    For that you must also set SCI_SETWRAPMODE(SC_WRAP_CHAR).
    An example was added to fallback.teco_ini.
  * You could also set SCI_SETLINEENDTYPESALLOWED(SC_LINE_END_TYPE_DEFAULT)
    to see the structure of inserted text.
* Alternatively we could have introduced a new command like EP or FW
  and also overload it to replace the current ED&amp;2048 (e.g. -EP and EP).
  In DEC TECO `W` comes closest to what 5EJ now does.
</pre>
</div>
</content>
</entry>
</feed>
