<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/csi.c, branch sixel-heap-buffer-overflow</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=sixel-heap-buffer-overflow</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=sixel-heap-buffer-overflow'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-05-22T09:39:04Z</updated>
<entry>
<title>csi: DECCRA: clamp and verify destination rectangle coordinates</title>
<updated>2026-05-22T09:39:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-22T09:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b18d8aa2f165a3b07c28f43de6812e057ba3233e'/>
<id>urn:sha1:b18d8aa2f165a3b07c28f43de6812e057ba3233e</id>
<content type='text'>
dst_right was already being clamped, but not dst_left.

In addition to that, reject the sequence if dst_left &gt; dst_right, or
dst_bottom &gt; dst_top.

This is already being done for the source rectangle, in
params_to_rectangular_area().

Closes #2352
</content>
</entry>
<entry>
<title>csi: secondary DA: fix comment; we don't use an XTerm version number</title>
<updated>2025-12-28T10:37:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-12-28T10:37:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=42e04c5c8741f739295f7da0b1bb1effda95547f'/>
<id>urn:sha1:42e04c5c8741f739295f7da0b1bb1effda95547f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: make sure the ASCII printer function is updated on plain underlines</title>
<updated>2025-12-24T10:33:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-12-24T10:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4cb17f5ae65e129765794986d36fbfc33c0c65bc'/>
<id>urn:sha1:4cb17f5ae65e129765794986d36fbfc33c0c65bc</id>
<content type='text'>
Otherwise, a sequence like

    \E[4:2;4m  # Enable double-underline, then immediately switch to single

Will switch to the slow printer, and then get stuck there even though
we immediately switch to plain underlines (which don't need the slow
printer).
</content>
</entry>
<entry>
<title>config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]</title>
<updated>2025-12-20T14:51:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-12-19T08:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cf2b390f6e096e7a2ca93d4dece153eb13261a2e'/>
<id>urn:sha1:cf2b390f6e096e7a2ca93d4dece153eb13261a2e</id>
<content type='text'>
The main reason for having two color sections is to be able to switch
between dark and light. Thus, it's better if the section names reflect
this, rather than the more generic 'colors' and 'colors2' (which was
the dark one and which was the light one, now again?)

When the second color section was added, we kept the original name,
colors, to make sure we didn't break existing configurations, and
third-party themes.

However, in the long run, it's probably better to be specific in the
section naming, to avoid confusion.

So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2'
as aliases for now, but mark them as deprecated. They WILL be removed
in a future release.

Also rename the option values for initial-color-theme, from 1/2, to
dark/light. Keep the old ones for now, marked as deprecated.

Update all bundled themes to use the new names. In the light-only
themes (i.e. themes that define a single, light, theme), use
colors-light, and set initial-color-theme=light.

Possible improvements: disable color switching if only one color
section has been explicitly configured (todo: figure out how to handle
the default color theme values...)
</content>
</entry>
<entry>
<title>csi: focus mode (private mode 1004): send focus event immediate, when enabled</title>
<updated>2025-11-01T07:12:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-10-30T05:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9728ada0289c446585325a74ded9c94958d9ab24'/>
<id>urn:sha1:9728ada0289c446585325a74ded9c94958d9ab24</id>
<content type='text'>
This lets the application now the current state, without having to
wait for the user to switch focus.

Fixes #2202
</content>
</entry>
<entry>
<title>csi: add '52' to the DA reply, to indicate PSC-52 support</title>
<updated>2025-06-10T05:12:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-06-09T07:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=968bc05c32a2e68282fd28e840b06ac63556d82e'/>
<id>urn:sha1:968bc05c32a2e68282fd28e840b06ac63556d82e</id>
<content type='text'>
Note: only *copy* is required to be enabled in security.osc52; paste
is optional, see
https://github.com/contour-terminal/contour/issues/1761#issuecomment-2944492097
</content>
</entry>
<entry>
<title>csi: when REP:ing a "combining" character, use correct width</title>
<updated>2025-05-16T16:46:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-16T08:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ebd1614316ea541cd1ac0cc0029f771be333176e'/>
<id>urn:sha1:ebd1614316ea541cd1ac0cc0029f771be333176e</id>
<content type='text'>
Before this patch, we just called c32width(), which only works on
actual codepoints. If the last printed character is a "combining"
character, i.e. a key into our lookup table for multi-codepoint
graphemes, we need to lookup the grapheme and pick the width from
there.

See https://gitlab.com/AutumnMeowMeow/jexer/-/issues/119#note_2499712901
</content>
</entry>
<entry>
<title>csi: implement private mode 2031 (dark/light mode detection)</title>
<updated>2025-04-26T12:23:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-20T10:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=10e7f291498a6600cfecc3cde604ea51de5f0f5a'/>
<id>urn:sha1:10e7f291498a6600cfecc3cde604ea51de5f0f5a</id>
<content type='text'>
* Recognize 'CSI ? 996 n', and respond with
  - 'CSI ? 997 ; 1 n' if the primary theme is active
  - 'CSI ? 997 ; 2 n' if the alternative theme is actice
* Implement private mode 2031, where changing the color
  theme (currently only possible via key bindings) causes the terminal
  to send the same CSI sequences as above.

In this context, foot's primary theme is considered dark, and the
alternative theme light (since the default theme is dark).

Closes #2025
</content>
</entry>
<entry>
<title>csi: don't allow client app to enable grapheme-shaping when disabled at compile-time</title>
<updated>2025-04-19T11:35:06Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-19T10:16:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cb2a64c5854205092150afe80f96177764bd4038'/>
<id>urn:sha1:cb2a64c5854205092150afe80f96177764bd4038</id>
<content type='text'>
Closes #2039
</content>
</entry>
<entry>
<title>DECSCUSR+DECRQSS: treat hollow cursor as a block cursor</title>
<updated>2025-02-21T07:03:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-21T07:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4f11d6086fd9341e663fafaf2b256981af389eef'/>
<id>urn:sha1:4f11d6086fd9341e663fafaf2b256981af389eef</id>
<content type='text'>
If the user has configured cursor.style=hollow, make DECSCUSR 1/2 set
the cursor to hollow rather than block, and make DECRQSS DECSCUSR
respond as if cursor.style=block.

The idea is to not expose the hollow variant in DECSCUSR in any way,
to avoid having to extend it with custom encodings.

Another way to think about it is this is just a slightly more
discoverable way of doing:

    cursor.style=block
    cursor.block-cursor-is-hollow=yes
</content>
</entry>
<entry>
<title>term: insert-mode: handle combining characters correctly</title>
<updated>2025-02-06T06:37:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-06T06:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=88dcde3ed8b30c14a5d834d0e88f9b4a5f584939'/>
<id>urn:sha1:88dcde3ed8b30c14a5d834d0e88f9b4a5f584939</id>
<content type='text'>
When the client application emits combining characters, for example
multi-codepoint emojis, in insert-mode, we ended up pushing partial
graphemes to the right, for each codepoint, resulting in too many
cells (and with the wrong content) being inserted.

The fix is fairly simple; don't "insert" when appending characters to
an existing grapheme cluster.

This isn't something we can detect easily in print_insert() (it would
require us to do grapheme clustering again). Fortunately, we do have
the required information in action_utf8_print(). So, pass this
information as a boolean to term_print().

Closes #1947
</content>
</entry>
<entry>
<title>csi: ignore 'CSI 21 t' - report window title</title>
<updated>2025-01-07T12:01:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-07T11:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8e425c4e976017c09ed2a9b4402067b3595501cc'/>
<id>urn:sha1:8e425c4e976017c09ed2a9b4402067b3595501cc</id>
<content type='text'>
It's not widely used (don't know _any_ application that uses it), and
can be used to trick users to run unwanted commands.
</content>
</entry>
<entry>
<title>csi: revert implementation of CSI 20 t</title>
<updated>2024-09-13T07:04:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-13T06:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9151685d04ef3b572f0c574e559143a71f97a854'/>
<id>urn:sha1:9151685d04ef3b572f0c574e559143a71f97a854</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: OSC-1 does not set the icon, it sets the icon _label_</title>
<updated>2024-09-13T07:04:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-13T06:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7984f08925e18e24e6b54ac4498d65fa26b2a4d6'/>
<id>urn:sha1:7984f08925e18e24e6b54ac4498d65fa26b2a4d6</id>
<content type='text'>
In fact, there appears there *is* no escape sequence to set the icon.

Keep most of the logic in place, but in practice, we'll always set the
icon to the app-id. That is, at startup, we set it to the configured
app-id (either from config, or the command line).

OSC-176, which sets the app-id, also updates the icon (to the app-id).
</content>
</entry>
<entry>
<title>toplevel-icon: implement OSC-1, CSI 20/21/22/23 t</title>
<updated>2024-09-13T07:04:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-09-10T16:53:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=97ec375c67cc7b071b0478b6c887057008dc469e'/>
<id>urn:sha1:97ec375c67cc7b071b0478b6c887057008dc469e</id>
<content type='text'>
* The toplevel icon is now set to the app-id, unless "overridden" by
  OSC-1 or OSC-0.
* Implemented OSC-1
* OSC-0 extended to also set the icon
* Implemented CSI 20 t - report window icon
* Implemented CSI 21 t - report window title
* Implemented CSI 22 ; 1 t - push window icon
* Implemented CS 23 ; 1 t - pop window icon
* Extended CSI 22/23 ; 0 t to also push/pop the icon
* Verify app-id set by OSC-176 is valid UTF-8
* Verify icon set by OSC-0/1 is valid UTF-8
</content>
</entry>
<entry>
<title>xsnprintf: various improvements related to xvsnprintf() and xsnprintf()</title>
<updated>2024-09-13T07:01:15Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2024-09-11T19:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d4a1283797b5a964d92e64c698d65f701a90e1cc'/>
<id>urn:sha1:d4a1283797b5a964d92e64c698d65f701a90e1cc</id>
<content type='text'>
Summary of changes:

* Make xvsnprintf() static
* restrict-qualify pointer arguments (as done by the libc equivalents)
* Make comments and spec references more thorough
* Remove pointless `n &lt;= INT_MAX` assertion (see comment)
* Use FATAL_ERROR() instead of xassert() (since the assertion is inside
  a shared util function but the caller is responsible for ensuring the
  condition holds true)
* Change some callers to use size_t instead of int for the return value
  (negative returns are impossible and all subsequent uses are size_t)

The updated comments and code were taken (and adapted) from:

https://gitlab.com/craigbarnes/dte/-/blob/49260bb154bca0434462a41c061e512540ec2e49/src/util/xsnprintf.c#L6-50

This work was entirely authored by me and I hereby license this
contribution under the MIT license (stated explicitly, so that
there's no ambiguity w.r.t. the original license).
</content>
</entry>
<entry>
<title>Remove a number of unused includes</title>
<updated>2024-08-02T06:28:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-08-01T18:11:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9e462d952ca1e0367e9e6eb6ee00a0cda7e8c9b'/>
<id>urn:sha1:a9e462d952ca1e0367e9e6eb6ee00a0cda7e8c9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: in-band window resize notifications, private mode 2048</title>
<updated>2024-07-19T04:54:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-06-30T17:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=38461eef6f3b612277bf48e49b9cc6c3b79e25bb'/>
<id>urn:sha1:38461eef6f3b612277bf48e49b9cc6c3b79e25bb</id>
<content type='text'>
This implements
https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83,
in-band window resize notifications.

When user enables private mode 2048 (in-band resize
notifications), *always* send current size, even if the mode is
already active.

This ensures applications can rely on getting a reply from the
terminal.
</content>
</entry>
<entry>
<title>osc: extend damage-cells-by-color to default fg/bg as well</title>
<updated>2024-07-03T08:53:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-03T08:53:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=22c8637610e15d2c84509a484fee41bccd0ad0fe'/>
<id>urn:sha1:22c8637610e15d2c84509a484fee41bccd0ad0fe</id>
<content type='text'>
When changing part of the color palette, through either OSC-4, or
OSC-10 and OSC-11 (and the corresponding reset OSCs: 104, 110 and
111), only dirty affected cells.

We've always done this, but only for OSC-4.

This patch breaks out that logic, and extends it to handle default
fg/bg too.

It also fixes a bug where cells with colored underlines were not
dirtied if the underline was the only part of the cell that was
affected by a OSC-4 change.
</content>
</entry>
<entry>
<title>csi: redraw margins after restoring the palette</title>
<updated>2024-07-03T07:47:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2024-07-01T17:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dd58dad15ac0b298a25a7a3412240bfaaebe9998'/>
<id>urn:sha1:dd58dad15ac0b298a25a7a3412240bfaaebe9998</id>
<content type='text'>
</content>
</entry>
</feed>
