<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/csi.c, branch master</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=master</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-09-02T07:18:21Z</updated>
<entry>
<title>term: wrap url related fields into a struct</title>
<updated>2026-09-02T07:18:21Z</updated>
<author>
<name>K4</name>
<email>k4@noreply.codeberg.org</email>
</author>
<published>2026-08-25T12:03:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=de649b6137ec1c5f7f684ef44e48d9a881a2744f'/>
<id>urn:sha1:de649b6137ec1c5f7f684ef44e48d9a881a2744f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>terminal: add visibility reports</title>
<updated>2026-07-30T12:18:58Z</updated>
<author>
<name>Tim Culverhouse</name>
<email>tim@timculverhouse.com</email>
</author>
<published>2026-07-28T19:16:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8db88cceb758b5be23e7db1fe74a48102ab07dc0'/>
<id>urn:sha1:8db88cceb758b5be23e7db1fe74a48102ab07dc0</id>
<content type='text'>
Applications cannot infer whether their terminal view is observable from
keyboard focus alone, so they may continue expensive rendering while the
surface is hidden.

Implement private mode 2033 and the one-shot visibility query. Report
Wayland xdg_toplevel suspension as not visible and otherwise remain
conservative by treating the terminal as potentially visible.

Amp-Thread-ID: https://ampcode.com/threads/T-019fb2b7-f245-7124-a69a-1484812532bb
Co-authored-by: Amp &lt;amp@ampcode.com&gt;
</content>
</entry>
<entry>
<title>csi: log warning when capping color/title stack</title>
<updated>2026-06-24T11:22:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-24T11:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3c5b584b0eafa772eb4376fb6eaf6643399e190e'/>
<id>urn:sha1:3c5b584b0eafa772eb4376fb6eaf6643399e190e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: push-title: limit title stack to 128 entries</title>
<updated>2026-06-24T11:19:28Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-24T11:19:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5c816dc6441c82f1e0f4a1feccbc5c59c682edd6'/>
<id>urn:sha1:5c816dc6441c82f1e0f4a1feccbc5c59c682edd6</id>
<content type='text'>
Closes #2367
</content>
</entry>
<entry>
<title>csi: XTPUSHCOLORS: limit stack depth to 128</title>
<updated>2026-06-24T11:16:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-24T11:12:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=671483674edea062f2ba7d55282e7d96001fc7a2'/>
<id>urn:sha1:671483674edea062f2ba7d55282e7d96001fc7a2</id>
<content type='text'>
Closes #2362
</content>
</entry>
<entry>
<title>csi: clamp REP count to scrollback-lines * cols</title>
<updated>2026-06-24T11:06:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-24T11:06:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e24ad0a793819b12929fadba53725cf5ec3826ab'/>
<id>urn:sha1:e24ad0a793819b12929fadba53725cf5ec3826ab</id>
<content type='text'>
This can be quite a lot, but hopefully less than 0x7fffffff, which is
the max value a VT parameter can have...

Closes #2366
</content>
</entry>
<entry>
<title>csi: kitty: limit pop count to the size of the flag stack</title>
<updated>2026-06-24T11:03:14Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-06-24T11:03:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=01b3e7ed9271e49ae571918a912e0783d272abac'/>
<id>urn:sha1:01b3e7ed9271e49ae571918a912e0783d272abac</id>
<content type='text'>
It's circular, but there's no need to walk through it more than
once...

csi: kitty: limit pop count to the size of the flag stack

It's circular, but there's no need to walk through it more than
once...
</content>
</entry>
<entry>
<title>csi: refactor CHT/CBT</title>
<updated>2026-06-12T15:41:08Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2026-05-24T22:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=66ec9fad881ac3ddafc3faf2b598345473c6fd7c'/>
<id>urn:sha1:66ec9fad881ac3ddafc3faf2b598345473c6fd7c</id>
<content type='text'>
Eliminate the outer loop, so that when moving the cursor multiple
tab stops, we no longer iterate the tab stop list all over again.

This also fixes a DoS flaw when passing a very large value as
CHT/CBT argument, which may hang the terminal.

Closes #2360
</content>
</entry>
<entry>
<title>Fix #2377: DECCRA: swapped row-bounds check dropping multi-row copies</title>
<updated>2026-06-12T11:55:09Z</updated>
<author>
<name>Campbell Barton</name>
<email>ideasman42@gmail.com</email>
</author>
<published>2026-06-03T23:43:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f66a020bbae3df4b10030a263571defb5c5ff01d'/>
<id>urn:sha1:f66a020bbae3df4b10030a263571defb5c5ff01d</id>
<content type='text'>
`dst_bottom &gt; dst_top` holds for every multi-row destination (rows
increase downward), so the guard rejected all multi-row copies. Flip to
`dst_top &gt; dst_bottom`, mirroring the sibling column check and DEC STD 070.
</content>
</entry>
<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>
</feed>
