<feed xmlns='http://www.w3.org/2005/Atom'>
<title>st-fork, branch master</title>
<subtitle>Fork of simpleterm. Contains patches for Xembed hosting.</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/'/>
<entry>
<title>Add terminfo entries for bracketed paste mode</title>
<updated>2023-10-07T10:16:59+00:00</updated>
<author>
<name>Peter Hofmann</name>
<email>scm@uninformativ.de</email>
</author>
<published>2023-10-07T05:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=9846a56bd7fdc86bf788db04bbbcbde7b7eb9952'/>
<id>9846a56bd7fdc86bf788db04bbbcbde7b7eb9952</id>
<content type='text'>
Helps Vim (and hopefully others) to discover that this feature exists
without further user configuration.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Helps Vim (and hopefully others) to discover that this feature exists
without further user configuration.
</pre>
</div>
</content>
</entry>
<entry>
<title>Unhide cursor on RIS (\033c)</title>
<updated>2023-10-07T10:16:59+00:00</updated>
<author>
<name>Peter Hofmann</name>
<email>scm@uninformativ.de</email>
</author>
<published>2023-10-07T05:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=559fdc278681c98470749adb59f01cd071720458'/>
<id>559fdc278681c98470749adb59f01cd071720458</id>
<content type='text'>
It is unclear if it's "required" to do this on RIS, but it's useful when
calling reset(1) after interactive programs have crashed and garbled up
the screen.

FWIW, other terminals do it as well (tested with XTerm, VTE, Kitty,
Alacritty, Linux VT).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is unclear if it's "required" to do this on RIS, but it's useful when
calling reset(1) after interactive programs have crashed and garbled up
the screen.

FWIW, other terminals do it as well (tested with XTerm, VTE, Kitty,
Alacritty, Linux VT).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix wide glyphs breaking "nowrap" mode</title>
<updated>2023-10-07T10:16:59+00:00</updated>
<author>
<name>Peter Hofmann</name>
<email>scm@uninformativ.de</email>
</author>
<published>2023-10-07T05:40:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=8abe4bcb41aa7fda0ae00823f6a20271124150db'/>
<id>8abe4bcb41aa7fda0ae00823f6a20271124150db</id>
<content type='text'>
Consider the following example:

    printf '\e[?7l';\
    for i in $(seq $(($(tput cols) - 1))); do printf a; done;\
    printf '🙈\n';\
    printf '\e[?7h'

Even though MODE_WRAP has been disabled, the emoji appeared on the next
line. This patch keeps wide glyphs on the same line and moves them to
the right-most possible position.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consider the following example:

    printf '\e[?7l';\
    for i in $(seq $(($(tput cols) - 1))); do printf a; done;\
    printf '🙈\n';\
    printf '\e[?7h'

Even though MODE_WRAP has been disabled, the emoji appeared on the next
line. This patch keeps wide glyphs on the same line and moves them to
the right-most possible position.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't scroll selection on the other screen</title>
<updated>2023-10-07T10:16:59+00:00</updated>
<author>
<name>Peter Hofmann</name>
<email>scm@uninformativ.de</email>
</author>
<published>2023-10-07T05:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=2fc7e532b23e2f820c6b73d352ec7c41fefa45b5'/>
<id>2fc7e532b23e2f820c6b73d352ec7c41fefa45b5</id>
<content type='text'>
Fixes garbage selections when switching to/from the alternate screen.

How to reproduce:

-   Be in primary screen.
-   Select something.
-   Run this (switches to alternate screen, positions the cursor at the
    bottom, triggers selscroll(), and then goes back to primary screen):

        tput smcup; tput cup $(tput lines) 0; echo foo; tput rmcup

-   Notice how the (visual) selection now covers a different line.

The reason is that selscroll() calls selnormalize() and that cannot find
the original range anymore. It's all empty lines now, so it snaps to
"select the whole line".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes garbage selections when switching to/from the alternate screen.

How to reproduce:

-   Be in primary screen.
-   Select something.
-   Run this (switches to alternate screen, positions the cursor at the
    bottom, triggers selscroll(), and then goes back to primary screen):

        tput smcup; tput cup $(tput lines) 0; echo foo; tput rmcup

-   Notice how the (visual) selection now covers a different line.

The reason is that selscroll() calls selnormalize() and that cannot find
the original range anymore. It's all empty lines now, so it snaps to
"select the whole line".
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bounds checks of dc.col</title>
<updated>2023-10-07T10:16:59+00:00</updated>
<author>
<name>Peter Hofmann</name>
<email>scm@uninformativ.de</email>
</author>
<published>2023-10-07T05:39:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=a6bbc0c96b0a1db804061b0db79101c6b26aec57'/>
<id>a6bbc0c96b0a1db804061b0db79101c6b26aec57</id>
<content type='text'>
dc.collen is the length of dc.col, not the maximum index, hence if x is
equal to dc.collen, then it's an error.

With config.def.h, the last valid index is 259, so this correctly
reports "black":

    $ printf '\033]4;259;?\e\\'

260 is an invalid index and this reports garbage instead of printing an
error:

    $ printf '\033]4;260;?\e\\'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dc.collen is the length of dc.col, not the maximum index, hence if x is
equal to dc.collen, then it's an error.

With config.def.h, the last valid index is 259, so this correctly
reports "black":

    $ printf '\033]4;259;?\e\\'

260 is an invalid index and this reports garbage instead of printing an
error:

    $ printf '\033]4;260;?\e\\'
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: remove the options target</title>
<updated>2023-09-22T13:16:52+00:00</updated>
<author>
<name>Hiltjo Posthuma</name>
<email>hiltjo@codemadness.org</email>
</author>
<published>2023-09-22T13:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=eb3b894f4076f2b25afc644a1f444b5cbd96aae8'/>
<id>eb3b894f4076f2b25afc644a1f444b5cbd96aae8</id>
<content type='text'>
The Makefile used to suppress output (by using @), so this target made sense at
the time.

But the Makefile should be simple and make debugging with less abstractions or
fancy printing.  The Makefile was made verbose and doesn't hide the build
output, so remove this target.

Prompted by a question on the mailing list about the options target.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Makefile used to suppress output (by using @), so this target made sense at
the time.

But the Makefile should be simple and make debugging with less abstractions or
fancy printing.  The Makefile was made verbose and doesn't hide the build
output, so remove this target.

Prompted by a question on the mailing list about the options target.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix for wide character being incorrectly cleared on MODE_INSERT</title>
<updated>2023-06-25T09:59:06+00:00</updated>
<author>
<name>Shi Tian</name>
<email>shitian@cock.li</email>
</author>
<published>2023-06-25T05:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=3a6d6d740110e6ee1b092d05ad746244eedabe4b'/>
<id>3a6d6d740110e6ee1b092d05ad746244eedabe4b</id>
<content type='text'>
Under insert mode, when inserting a normal character in front of
a wide character, the affected region is shifted to the right by
one cell. However, the empty cell is reset as if being a part of a
wide character, causing the following cell being mishandled as a
dummy cell.
To reproduce the bug:
	printf '\033[4h' # set MODE_INSERT
	printf 妳好
	printf '\033[4D'
	printf 'x'
	printf '\033[4l\n'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Under insert mode, when inserting a normal character in front of
a wide character, the affected region is shifted to the right by
one cell. However, the empty cell is reset as if being a part of a
wide character, causing the following cell being mishandled as a
dummy cell.
To reproduce the bug:
	printf '\033[4h' # set MODE_INSERT
	printf 妳好
	printf '\033[4D'
	printf 'x'
	printf '\033[4l\n'
</pre>
</div>
</content>
</entry>
<entry>
<title>ignore C1 control characters in UTF-8 mode</title>
<updated>2023-02-07T19:00:59+00:00</updated>
<author>
<name>Hiltjo Posthuma</name>
<email>hiltjo@codemadness.org</email>
</author>
<published>2023-02-07T19:00:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=211964d56ee00a7d46e251cbc150afb79138ae37'/>
<id>211964d56ee00a7d46e251cbc150afb79138ae37</id>
<content type='text'>
Ignore processing and printing C1 control characters in UTF-8 mode.
These are in the range: 0x80 - 0x9f.

By default in st the mode is set to UTF-8.

This matches more the behaviour of xterm with the options -u8 or +u8 also.
Also see the xterm resource "allowC1Printable".

Let me know if this breaks something, in most cases I don't think so.

As usual a very good reference is:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ignore processing and printing C1 control characters in UTF-8 mode.
These are in the range: 0x80 - 0x9f.

By default in st the mode is set to UTF-8.

This matches more the behaviour of xterm with the options -u8 or +u8 also.
Also see the xterm resource "allowC1Printable".

Let me know if this breaks something, in most cases I don't think so.

As usual a very good reference is:
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for DSR response "OK" escape sequence</title>
<updated>2023-02-07T18:57:34+00:00</updated>
<author>
<name>Adam Price</name>
<email>komidore64@gmail.com</email>
</author>
<published>2023-02-07T18:54:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=f17abd25b376c292f783062ecf821453eaa9cc4c'/>
<id>f17abd25b376c292f783062ecf821453eaa9cc4c</id>
<content type='text'>
"VT100 defines an escape sequence [1] called Device Status Report (DSR). When
the DSR sequence received is `csi 5n`, an "OK" response `csi 0n` is returned.
This patch adds that "OK" response.

I encountered this missing sequence when I noticed that fzf [2] would clobber
my prompt whenever completing a find.

To test that ST doesn't currently respond to `csi 5n`, use fzf's shell
extension in ST's repo to complete the path for a file.

    my-fancy-prompt $ vim **&lt;tab&gt;
    &lt;select a file&gt;
    st.c

Select a file with &lt;enter&gt;, and notice that fzf clobbers some or all of your
prompt.

After applying this patch, do the same test as above and notice that fzf has no
longer clobbered your prompt by placing the file name in the correct position
in your command.

    my-fancy-prompt $ vim **&lt;tab&gt;
    &lt;select a file&gt;
    my-fancy prompt $ vim st.c

Thank you for considering my first patch submission.

[1] https://www.xfree86.org/current/ctlseqs.html#VT100%20Mode
[2] https://github.com/junegunn/fzf
"

Patch slightly adapted with input from the mailinglist,
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
"VT100 defines an escape sequence [1] called Device Status Report (DSR). When
the DSR sequence received is `csi 5n`, an "OK" response `csi 0n` is returned.
This patch adds that "OK" response.

I encountered this missing sequence when I noticed that fzf [2] would clobber
my prompt whenever completing a find.

To test that ST doesn't currently respond to `csi 5n`, use fzf's shell
extension in ST's repo to complete the path for a file.

    my-fancy-prompt $ vim **&lt;tab&gt;
    &lt;select a file&gt;
    st.c

Select a file with &lt;enter&gt;, and notice that fzf clobbers some or all of your
prompt.

After applying this patch, do the same test as above and notice that fzf has no
longer clobbered your prompt by placing the file name in the correct position
in your command.

    my-fancy-prompt $ vim **&lt;tab&gt;
    &lt;select a file&gt;
    my-fancy prompt $ vim st.c

Thank you for considering my first patch submission.

[1] https://www.xfree86.org/current/ctlseqs.html#VT100%20Mode
[2] https://github.com/junegunn/fzf
"

Patch slightly adapted with input from the mailinglist,
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed OSC color reset without parameter-&gt;resets all colors</title>
<updated>2023-02-05T12:29:35+00:00</updated>
<author>
<name>Hiltjo Posthuma</name>
<email>hiltjo@codemadness.org</email>
</author>
<published>2023-02-05T12:29:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/st-fork/commit/?id=7e8050cc621f27002eaf1be8114dee2497beff91'/>
<id>7e8050cc621f27002eaf1be8114dee2497beff91</id>
<content type='text'>
Adapted from (garbled) patch by wim &lt;wim@thinkerwim.org&gt;

Additional notes: it should reset all the colors using xloadcols().
To reproduce: set a different (theme) color using some escape code, then reset
it:

	printf '\x1b]104\x07'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adapted from (garbled) patch by wim &lt;wim@thinkerwim.org&gt;

Additional notes: it should reset all the colors using xloadcols().
To reproduce: set a different (theme) color using some escape code, then reset
it:

	printf '\x1b]104\x07'
</pre>
</div>
</content>
</entry>
</feed>
