<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/csi.c, branch 1.11.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.11.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.11.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2022-02-05T16:00:54Z</updated>
<entry>
<title>fcft: adapt to API changes in fcft-3.x</title>
<updated>2022-02-05T16:00:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-08-21T12:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e0227266cabc015c282774ac898e3f52dce943df'/>
<id>urn:sha1:e0227266cabc015c282774ac898e3f52dce943df</id>
<content type='text'>
Fcft no longer uses wchar_t, but plain uint32_t to represent
codepoints.

Since we do a fair amount of string operations in foot, it still makes
sense to use something that actually _is_ a string (or character),
rather than an array of uint32_t.

For this reason, we switch out all wchar_t usage in foot to
char32_t. We also verify, at compile-time, that char32_t used
UTF-32 (which is what fcft expects).

Unfortunately, there are no string functions for char32_t. To avoid
having to re-implement all wcs*() functions, we add a small wrapper
layer of c32*() functions.

These wrapper functions take char32_t arguments, but then simply call
the corresponding wcs*() function.

For this to work, wcs*() must _also_ be UTF-32 compatible. We can
check for the presence of the  __STDC_ISO_10646__ macro. If set,
wchar_t is at least 4 bytes and its internal representation is UTF-32.

FreeBSD does *not* define this macro, because its internal wchar_t
representation depends on the current locale. It _does_ use UTF-32
_if_ the current locale is UTF-8.

Since foot enforces UTF-8, we simply need to check if __FreeBSD__ is
defined.

Other fcft API changes:

* fcft_glyph_rasterize() -&gt; fcft_codepoint_rasterize()
* font.space_advance has been removed
* ‘tags’ have been removed from fcft_grapheme_rasterize()
* ‘fcft_log_init()’ removed
* ‘fcft_init()’ and ‘fcft_fini()’ must be explicitly called
</content>
</entry>
<entry>
<title>SGR-Pixels mouse mode, closes #762</title>
<updated>2022-01-01T10:02:30Z</updated>
<author>
<name>Autumn Lamonte</name>
<email>AutumnWalksTheLake@gmail.com</email>
</author>
<published>2021-12-30T11:13:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d72ba4a062b52a8efed09c0160a985345b9f722f'/>
<id>urn:sha1:d72ba4a062b52a8efed09c0160a985345b9f722f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term_erase(): replace coord-typed arguments with regular ints</title>
<updated>2021-12-26T11:39:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-25T18:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=39bb6be8bfb3700947b21cbd3d466de755368b9b'/>
<id>urn:sha1:39bb6be8bfb3700947b21cbd3d466de755368b9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: store color index, not actual color, in cell’s fg/bg attributes</title>
<updated>2021-12-26T11:37:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-25T16:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c2bf2d3650b6a837efec834d23b1c3774c263852'/>
<id>urn:sha1:c2bf2d3650b6a837efec834d23b1c3774c263852</id>
<content type='text'>
When using indexed colors (i.e. SGR 30/40/90/100), store the index
into the cell’s fg/bg attributes, not the actual color value.

This has a couple of consequences:

Color table lookup is now done when rendering. This means a rendered
cell will always reflect the *current* color table, not the color
table that was in use when the cell was printed to.

This simplifies the OSC-4/104 logic, since we no longer need to update
the grid - we just have to damage it to trigger rendering.

Furthermore, this change simplifies the VT parsing, since we no longer
need to do any memory loads (except loading the SGR parameter values),
only writes.
</content>
</entry>
<entry>
<title>csi: no need to set VT state’s fg/bg to the default ones on SGR reset</title>
<updated>2021-12-26T11:37:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-12-25T16:13:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8bf757f466ec7f3536e181873f097f3e211bf9a0'/>
<id>urn:sha1:8bf757f466ec7f3536e181873f097f3e211bf9a0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: rename: KITTY_KBD_MASK -&gt; KITTY_KBD_SUPPORTED</title>
<updated>2021-11-28T14:14:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-22T21:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8f38cd486f73db1bb2239acf0ab8382786a21752'/>
<id>urn:sha1:8f38cd486f73db1bb2239acf0ab8382786a21752</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: kitty: remove unneeded xasserts</title>
<updated>2021-11-28T14:14:55Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-21T14:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=28ad0ca60295fadc42ac75f6a1237d12fff371ac'/>
<id>urn:sha1:28ad0ca60295fadc42ac75f6a1237d12fff371ac</id>
<content type='text'>
‘idx’ is calculated just above, and the logic is simple enough that we
don’t really need to assert it.
</content>
</entry>
<entry>
<title>csi: kitty: log flags after ‘update’ operation</title>
<updated>2021-11-28T14:14:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-16T15:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c3fda015544c2ef442656bc5b1b9a1363a247876'/>
<id>urn:sha1:c3fda015544c2ef442656bc5b1b9a1363a247876</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: kitty: s/mode/flags in debug logs</title>
<updated>2021-11-28T14:14:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-16T15:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ad2539af4430751c5fceafc635a0b0a45cc438c0'/>
<id>urn:sha1:ad2539af4430751c5fceafc635a0b0a45cc438c0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>kitty kbd: add flag state, implement push/pop/update/query</title>
<updated>2021-11-28T14:14:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-16T15:32:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fec42e5941c20f4b69164dd0d78ea7e7e0f17de5'/>
<id>urn:sha1:fec42e5941c20f4b69164dd0d78ea7e7e0f17de5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: track cell color source</title>
<updated>2021-11-20T15:46:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-20T15:29:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d46af6bd7ac7606bf99d63b2453b656a5defb892'/>
<id>urn:sha1:d46af6bd7ac7606bf99d63b2453b656a5defb892</id>
<content type='text'>
Each cell now tracks it’s current color source:

* default fg/bg
* base16 fg/bg (maps to *both* the regular and bright colors)
* base256 fg/bg
* RGB

Note that we don’t have enough bits to separate the regular from the
bright colors. These _shouldn’t_ be the same, so we ought to be
fine...
</content>
</entry>
<entry>
<title>input: add support for modifyOtherKeys=2</title>
<updated>2021-11-13T10:09:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-11T16:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4a740509996d3a7e8808593d1cbc0128b1ae03ed'/>
<id>urn:sha1:4a740509996d3a7e8808593d1cbc0128b1ae03ed</id>
<content type='text'>
Similar to modifyOtherKeys=1 (foot’s default, and only, mode), except
that:

* All modifiers (and not just Ctrl) generate \E[27;m;n~ escapes
* Regular keys (with modifiers) also generate \E[27;m;n~ escapes (for
  example, C-h no longer generates ^H, but \E[27;5;104~)

For our keymap based lookups, this is handled by adding
MOD_MODIFY_OTHER_KEYS_STATE&lt;N&gt; variants.

For “generic” keys, we simply adjust the conditions for when to emit a
\E[27;m;n~ escape - the only requirement is that at least one modifier
is active.
</content>
</entry>
<entry>
<title>csi: various, minor code/formatting improvements</title>
<updated>2021-08-30T06:40:03Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-08-30T06:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6bd151438fc5b3b4b56de084f03afcdde19203fe'/>
<id>urn:sha1:6bd151438fc5b3b4b56de084f03afcdde19203fe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: erase scrollback: cancel selection if it touches the scrollback</title>
<updated>2021-07-18T14:14:21Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-16T14:45:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5f0ceb72f176caf7673ea1d4bc5195f26f4b4df7'/>
<id>urn:sha1:5f0ceb72f176caf7673ea1d4bc5195f26f4b4df7</id>
<content type='text'>
This breaks out the scrollback erasing logic for \E[3J from csi.c, and
moves it to the new function term_erase_scrollback(), and changes the
logic to calculate the start and end row (absolute) numbers of the
scrollback, and only iterate those, instead of iterating *all* rows,
filtering out those that are on-screen.

It also adds an intersection range check of the selection range, and
cancels the selection if it touches any of the deleted scrollback
rows.

This fixes a crash when trying to render the next frame, since the
selection now references rows that have been freed.

Closes #633
</content>
</entry>
<entry>
<title>csi: invert the meaning of DECSDM</title>
<updated>2021-07-14T17:17:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-07-14T17:17:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fcd989734235c25e64f8fb38ffcfdf381e933873'/>
<id>urn:sha1:fcd989734235c25e64f8fb38ffcfdf381e933873</id>
<content type='text'>
There has been some confusion whether enabling DECSDM (private mode
80) enables or disables sixel scrolling.

Foot currently enables scrolling when DECSDM is set, and this patch
changes this, such that setting DECSDM now *disables* scrolling.

The confusion is apparently due to a documentation error in the VT340
manual, as described in
https://github.com/dankamongmen/notcurses/issues/1782#issuecomment-863603641.

And that makes sense, in a way: the SDM in DECSDM stands for Sixel
Display Mode. I.e. it stands to reason that enabling that disables
scrolling.

Anyway, this lead to https://github.com/hackerb9/lsix/issues/41, where
it was eventually proven (by testing on a real VT340), that foot, and
a large number of other terminals (including XTerm) has it wrong:
https://github.com/hackerb9/lsix/issues/41#issuecomment-873269599.
</content>
</entry>
<entry>
<title>csi: implement XTVERSION (CSI &gt; 0q)</title>
<updated>2021-06-13T15:19:41Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-16T11:00:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3adc3367e69e1b1c13595167cb0dbeb48391ca83'/>
<id>urn:sha1:3adc3367e69e1b1c13595167cb0dbeb48391ca83</id>
<content type='text'>
This is a fairly new XTerm extension. The reply is on the format:

  DCS &gt; | text ST

XTerm replies with ‘text’ = “XTerm(366)”.

Foot replies with ‘text’ = “foot(1.6.4)”

Closes #359
</content>
</entry>
<entry>
<title>csi: CHT: don’t alter the LCF flag</title>
<updated>2021-06-08T17:53:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-07T19:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9929a5ce0a38b6d0291f45e8b14e822ca5b84534'/>
<id>urn:sha1:9929a5ce0a38b6d0291f45e8b14e822ca5b84534</id>
<content type='text'>
This makes us pass the vttest 11.5.4 (Test non-VT100 -&gt; Test ISO-6429
cursor-movement -&gt; CHT) test.
</content>
</entry>
<entry>
<title>csi: IL+DL: move cursor to column 0</title>
<updated>2021-06-08T17:52:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-07T19:57:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0febce90073b8a8cf7487eb01fa429d5a379e7bb'/>
<id>urn:sha1:0febce90073b8a8cf7487eb01fa429d5a379e7bb</id>
<content type='text'>
This fixes vttest 11.6.6.3

Test non-VT100 -&gt;
Test ISO-6429 colors -&gt;
Test of VT102-style features with BCE -&gt;
Test Insert/Delete Char/Line
</content>
</entry>
<entry>
<title>config: add ‘beam-thickness’ option</title>
<updated>2021-04-30T18:36:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-30T18:31:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7ce767ab87ca915b2ac4023cc95dbda81fe87abd'/>
<id>urn:sha1:7ce767ab87ca915b2ac4023cc95dbda81fe87abd</id>
<content type='text'>
* Rename cursor.style value ‘bar’ to ‘beam’. ‘bar’ remains recognized,
  but should eventually be deprecated and then removed.
* Add ‘cursor.beam-thickness’ option, a pt-or-px value specifying the
  thickness of the beam cursor. Defaults to 1.5pt.
* Rename (and export) pt_or_px_as_pixels() to
  term_pt_or_px_as_pixels()
* Change term_pt_or_px_as_pixels() to round point values instead of
  truncating them.
</content>
</entry>
<entry>
<title>csi: add support for DECSET 2026, as an alternative to BSU/ESU sequences</title>
<updated>2021-04-25T17:35:46Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-04-25T17:35:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f95d7d468492144d7d36c08ab1b08f13a076e3fc'/>
<id>urn:sha1:f95d7d468492144d7d36c08ab1b08f13a076e3fc</id>
<content type='text'>
See: https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2#note_847720
</content>
</entry>
</feed>
