<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/src/interface-curses, branch session-extensions</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>scroll caret __almost__ always automatically after key presses</title>
<updated>2025-04-04T00:53:07+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-04-04T00:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d2f759a1d4c8a42db73ac62cb8317847a1b40249'/>
<id>d2f759a1d4c8a42db73ac62cb8317847a1b40249</id>
<content type='text'>
* The old heuristics - scroll if dot changes after key press -
  turned out to be too simplistic.
  They broke the clang-format macro (M#cf), which left the view at the
  top of the document since the entire document is temporarily erased.
  Other simplified examples of this bug would be:
  @^Um{[: HECcat$ ]:} Mm
  Or even: @^Um{[: H@X.aG.a ]:} Mm
* Actually, the heuristics could be tricked even without deleting any
  significant amount of text from the buffer.
  The following test case replaces the previous character with a linefeed
  in a single key press:
  @^Um{-DI^J$} Mm
  If executed on the last visible line, dot wouldn't be scrolled into the view
  since it did not change.
* At the same time, we'd like to keep the existing mouse scroll behavior from
  fnkeys.tes, which is allowed to scroll dot outside of the visible area.
  Therefore, dot is scrolled into view always, except after mouse events.
  You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro,
  which is arguably not always straight forward.
* Some macros like M#cf may still leave the vertical scrolling position
  in unexpected positions. This could either be fixed by eradicating all
  remaining automatic scrolling from Scintilla or by explicitly restoring
  the vertical position from the macro (FIXME).
* This was broken since the introduction of mouse support,
  so it wasn't in v2.3.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The old heuristics - scroll if dot changes after key press -
  turned out to be too simplistic.
  They broke the clang-format macro (M#cf), which left the view at the
  top of the document since the entire document is temporarily erased.
  Other simplified examples of this bug would be:
  @^Um{[: HECcat$ ]:} Mm
  Or even: @^Um{[: H@X.aG.a ]:} Mm
* Actually, the heuristics could be tricked even without deleting any
  significant amount of text from the buffer.
  The following test case replaces the previous character with a linefeed
  in a single key press:
  @^Um{-DI^J$} Mm
  If executed on the last visible line, dot wouldn't be scrolled into the view
  since it did not change.
* At the same time, we'd like to keep the existing mouse scroll behavior from
  fnkeys.tes, which is allowed to scroll dot outside of the visible area.
  Therefore, dot is scrolled into view always, except after mouse events.
  You may have to call SCI_SCROLLCARET manually in the ^KMOUSE macro,
  which is arguably not always straight forward.
* Some macros like M#cf may still leave the vertical scrolling position
  in unexpected positions. This could either be fixed by eradicating all
  remaining automatic scrolling from Scintilla or by explicitly restoring
  the vertical position from the macro (FIXME).
* This was broken since the introduction of mouse support,
  so it wasn't in v2.3.0.
</pre>
</div>
</content>
</entry>
<entry>
<title>further improved monochrome terminal support: fixed reverse text on reverse backgrounds</title>
<updated>2025-03-16T12:13:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-16T12:13:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=327d749ce03d25897447ec36ed4c46c0da4a72cb'/>
<id>327d749ce03d25897447ec36ed4c46c0da4a72cb</id>
<content type='text'>
* Unfortunately we cannot use `wbkgdset(win, A_REVERSE)` if we plan to
  use reverse text on this background, i.e. if we want to cancel out the background A_REVERSE.
* SciTECO therefore no longer uses background attributes, but only foreground attributes.
  When setting a reverse text, we XOR A_REVERSE into the previous attributes.
* This fixes control characters especially in the info line and popups, as well as rendering
  of the popup scroll bars.
* The command-line should now be rendered properly even on a dark-on-bright color theme
  (which does not yet exist).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Unfortunately we cannot use `wbkgdset(win, A_REVERSE)` if we plan to
  use reverse text on this background, i.e. if we want to cancel out the background A_REVERSE.
* SciTECO therefore no longer uses background attributes, but only foreground attributes.
  When setting a reverse text, we XOR A_REVERSE into the previous attributes.
* This fixes control characters especially in the info line and popups, as well as rendering
  of the popup scroll bars.
* The command-line should now be rendered properly even on a dark-on-bright color theme
  (which does not yet exist).
</pre>
</div>
</content>
</entry>
<entry>
<title>Curses: use special ellipsis symbol instead of "..." when truncating strings</title>
<updated>2025-03-14T23:46:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-14T23:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=24b08dac99804bed30824e9becb6f773d5db1874'/>
<id>24b08dac99804bed30824e9becb6f773d5db1874</id>
<content type='text'>
This requires Unicode icon support to be enabled via ED.
The ellipsis symbol is shorter and more distinctive, allowing more of the original
text to be preserved before truncation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requires Unicode icon support to be enabled via ED.
The ellipsis symbol is shorter and more distinctive, allowing more of the original
text to be preserved before truncation.
</pre>
</div>
</content>
</entry>
<entry>
<title>updated Scinterm: my monochrome patch was merged only with some modifications</title>
<updated>2025-03-12T23:28:23+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-12T23:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=8d8d62a108d6329049dac63f25c6119db6c44d12'/>
<id>8d8d62a108d6329049dac63f25c6119db6c44d12</id>
<content type='text'>
* SCI_COLOR_PAIR() is now a function teco_color_pair() since it also became
  an inline function in Scinterm.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* SCI_COLOR_PAIR() is now a function teco_color_pair() since it also became
  an inline function in Scinterm.
</pre>
</div>
</content>
</entry>
<entry>
<title>added "email" lexer for writing mails</title>
<updated>2025-03-08T19:03:48+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-08T19:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=bdf35b89fe8d653847ab077d4183b71feebd48d2'/>
<id>bdf35b89fe8d653847ab077d4183b71feebd48d2</id>
<content type='text'>
* Highlights both 1st level and 2nd level quotes and signatures.
* This also sets the edge to 78 columns, as is recommended for email and
  enables word wrapping.
  The edge mode is not set, since it kind of looks ugly in Scinterm.
* Helps when using SciTECO as the email editor for instance in the
  Aerc mail client.
* Unfortunately, we cannot set up Scintilla to automatically break words
  after 78 columns (or perhaps that's a good thing).
  You can use the M#rf reformat-paragraph macro to reflow paragraphs
  before sending the mail.
  This will take the edge column into account even if no edge mode is set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Highlights both 1st level and 2nd level quotes and signatures.
* This also sets the edge to 78 columns, as is recommended for email and
  enables word wrapping.
  The edge mode is not set, since it kind of looks ugly in Scinterm.
* Helps when using SciTECO as the email editor for instance in the
  Aerc mail client.
* Unfortunately, we cannot set up Scintilla to automatically break words
  after 78 columns (or perhaps that's a good thing).
  You can use the M#rf reformat-paragraph macro to reflow paragraphs
  before sending the mail.
  This will take the edge column into account even if no edge mode is set.
</pre>
</div>
</content>
</entry>
<entry>
<title>ncurses: support monochrome terminals</title>
<updated>2025-03-07T19:52:45+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-07T19:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a7207d8526dd05e778e3972003a9be1a5106321a'/>
<id>a7207d8526dd05e778e3972003a9be1a5106321a</id>
<content type='text'>
* If the background color would be non-black, render text in reverse
  video. ncurses doesn't do that automatically.
* Fixes rendering under historical terminals like VT100 and VT240,
  but also all of the monochrome versions of modern emulators in terminfo.
* This also improves the situation when $TERM is set to something conservative,
  e.g. when connecting via RS232.
* Scinterm is temporarily changed to my own fork, which already contains
  a monochrome patch.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* If the background color would be non-black, render text in reverse
  video. ncurses doesn't do that automatically.
* Fixes rendering under historical terminals like VT100 and VT240,
  but also all of the monochrome versions of modern emulators in terminfo.
* This also improves the situation when $TERM is set to something conservative,
  e.g. when connecting via RS232.
* Scinterm is temporarily changed to my own fork, which already contains
  a monochrome patch.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented ncurses clipboard support via external processes</title>
<updated>2025-02-27T08:38:42+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-27T08:38:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f421c8fcf3c47c78c666906165006969ff21429e'/>
<id>f421c8fcf3c47c78c666906165006969ff21429e</id>
<content type='text'>
* As an alternative to OSC-52, which is rarely supported by terminal emulators.
* Makes the new mouse support much more useful since you rely on good builtin
  clipboard support. You can no longer e.g. just double-click a word to copy it into
  the "primary" selection as terminal emulators do by default.
* Set $SCITECO_CLIPBOARD_SET/GET e.g. to xclip, way-copy, pbcopy or some wrapper script.
* This is currently using POSIX-specific popen() API, so it behaves a bit different
  to command execution via EC/EG.
  I am not sure if it's worth rewriting with the GSpawn-API, since it will be used
  only on POSIX anyway and a GSpawn-based implementation is likely to be a bit larger.
* Should there be some small command-line utility for interacting (esp. pasting) via OSC-52,
  built-in OSC-52 support could well be removed from SciTECO.
  Currently, I know only of https://github.com/theimpostor/osc/ and it requires
  very recent Go compilers. (I still haven't tested it. Quite possibly, pasting when run as
  a piped command is impossible.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* As an alternative to OSC-52, which is rarely supported by terminal emulators.
* Makes the new mouse support much more useful since you rely on good builtin
  clipboard support. You can no longer e.g. just double-click a word to copy it into
  the "primary" selection as terminal emulators do by default.
* Set $SCITECO_CLIPBOARD_SET/GET e.g. to xclip, way-copy, pbcopy or some wrapper script.
* This is currently using POSIX-specific popen() API, so it behaves a bit different
  to command execution via EC/EG.
  I am not sure if it's worth rewriting with the GSpawn-API, since it will be used
  only on POSIX anyway and a GSpawn-based implementation is likely to be a bit larger.
* Should there be some small command-line utility for interacting (esp. pasting) via OSC-52,
  built-in OSC-52 support could well be removed from SciTECO.
  Currently, I know only of https://github.com/theimpostor/osc/ and it requires
  very recent Go compilers. (I still haven't tested it. Quite possibly, pasting when run as
  a piped command is impossible.)
</pre>
</div>
</content>
</entry>
<entry>
<title>Curses: fixed flickering when scrolling through the auto-completion popup (or generally when keeping it on screen even unchanged)</title>
<updated>2025-02-23T23:27:05+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-23T23:27:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e89593076f488e9e113cc58a5050b7283eedfb6c'/>
<id>e89593076f488e9e113cc58a5050b7283eedfb6c</id>
<content type='text'>
* Turns out that updating the hardware cursor - which is not displayed anyway - would cause premature
  screen updates in teco_interface_refresh(), thus causing flickering, for instance
  when quickly cycling through the auto completion popup.
  Or even just when clicking its borders which does not change it.
* Touching the popup window is actually important and expected since
  Scinterm is also touching its window by completely redrawing it.
  Touching the popup window makes sure, it's still copied into newscr and overlaps
  the Scintilla view even if the popup did not change - e.g. when pressing an unassigned
  function key or clicking on the popup borders.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Turns out that updating the hardware cursor - which is not displayed anyway - would cause premature
  screen updates in teco_interface_refresh(), thus causing flickering, for instance
  when quickly cycling through the auto completion popup.
  Or even just when clicking its borders which does not change it.
* Touching the popup window is actually important and expected since
  Scinterm is also touching its window by completely redrawing it.
  Touching the popup window makes sure, it's still copied into newscr and overlaps
  the Scintilla view even if the popup did not change - e.g. when pressing an unassigned
  function key or clicking on the popup borders.
</pre>
</div>
</content>
</entry>
<entry>
<title>Curses: avoid completing filenames when clicking the upper border of the popup window</title>
<updated>2025-02-23T23:24:22+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-23T23:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=53dfbfec4bd58615eb049ed0cd06fdf8e2844360'/>
<id>53dfbfec4bd58615eb049ed0cd06fdf8e2844360</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>support mouse interaction with popup windows</title>
<updated>2025-02-23T01:52:39+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-02-14T22:32:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=428dafa568923d5632101c716fb20a3de35d27be'/>
<id>428dafa568923d5632101c716fb20a3de35d27be</id>
<content type='text'>
* Curses allows scrolling with the scroll wheel at least
  if mouse support is enabled via ED flags.
  Gtk always supported that.
* Allow clicking on popup entries to fully autocomplete them.
  Since this behavior - just like auto completions - is parser state-dependant,
  I introduced a new state method (insert_completion_cb).
  All the implementations are currently in cmdline.c since there is some overlap
  with the process_edit_cmd_cb implementations.
* Fixed pressing undefined function keys while showing the popup.
  The popup area is no longer redrawn/replaced with the Scintilla view.
  Instead, continue to show the popup.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Curses allows scrolling with the scroll wheel at least
  if mouse support is enabled via ED flags.
  Gtk always supported that.
* Allow clicking on popup entries to fully autocomplete them.
  Since this behavior - just like auto completions - is parser state-dependant,
  I introduced a new state method (insert_completion_cb).
  All the implementations are currently in cmdline.c since there is some overlap
  with the process_edit_cmd_cb implementations.
* Fixed pressing undefined function keys while showing the popup.
  The popup area is no longer redrawn/replaced with the Scintilla view.
  Instead, continue to show the popup.
</pre>
</div>
</content>
</entry>
</feed>
