<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/CHANGELOG.md, branch 1.14.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.14.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.14.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2023-04-03T16:52:22Z</updated>
<entry>
<title>changelog: prepare for 1.14.0</title>
<updated>2023-04-03T16:52:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-04-03T16:52:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=862a003b5b68a08d7ddfc653c3b36aaa21839d6c'/>
<id>urn:sha1:862a003b5b68a08d7ddfc653c3b36aaa21839d6c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>terminfo: remove DECRST of DECCOLM+DECSCLM</title>
<updated>2023-04-02T16:00:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-31T08:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ae81f5af4caaa8bbad666e028f6fde9c23e58b0d'/>
<id>urn:sha1:ae81f5af4caaa8bbad666e028f6fde9c23e58b0d</id>
<content type='text'>
We’ve never supported neither 132-column mode, nor smooth
scrolling. But we _did_ recognize the escape sequences.

We don’t, anymore. Thus it makes very little sense to include these
escapes in any of our terminfo capabilities. So, remove them.
</content>
</entry>
<entry>
<title>csi: DECCOLM+DECSCLM: remove all support</title>
<updated>2023-03-31T11:16:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-01-19T18:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f114068a468f6d6d39603b4ed26049de7b701842'/>
<id>urn:sha1:f114068a468f6d6d39603b4ed26049de7b701842</id>
<content type='text'>
We don’t support neither 132 column mode, nor smooth scrolling. Thus
it makes little sense to recognize these control condes.

Note that while XTerm does support 132 columns, it is disabled by
default. In this mode, XTerm also doesn’t trigger the
side-effects (i.e. clearing the screen).

Closes #1265
</content>
</entry>
<entry>
<title>changelog: typo: now -&gt; not</title>
<updated>2023-03-31T08:43:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-31T08:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=deb43c8dc3930954537e8294805aaa71c199d7a3'/>
<id>urn:sha1:deb43c8dc3930954537e8294805aaa71c199d7a3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>changeloge: remove bad escape char</title>
<updated>2023-03-31T08:42:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-31T08:42:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=03b23ed6e5bd3b9bd0735d577d9ad722e1e40ff3'/>
<id>urn:sha1:03b23ed6e5bd3b9bd0735d577d9ad722e1e40ff3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>changelog: remove trailing back-tick</title>
<updated>2023-03-31T08:41:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-31T08:41:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a5dd00362735693faef2c11e7349a42a1a3e3593'/>
<id>urn:sha1:a5dd00362735693faef2c11e7349a42a1a3e3593</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: protect against integer overflow when accumulating scroll damage</title>
<updated>2023-03-30T14:13:19Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-28T16:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=981e4b77cb96ab277ea3b7a1e8aebf0e4589c032'/>
<id>urn:sha1:981e4b77cb96ab277ea3b7a1e8aebf0e4589c032</id>
<content type='text'>
When accumulating scroll damage, we check if the last scroll damage’s
scrolling region, and type, matches the new/current scroll damage. If
so, the number of lines in the last scroll damage is increased,
instead of adding a new scroll damage instance to the list.

If the scroll damage list isn’t consumed, this build up of scroll
damage would eventually overflow.

And, even if it didn’t overflow, it could become large enough, that
when later used to calculate e.g. the affected surface area, while
rendering a frame, would cause an overflow there instead.

This patch fixes both issues by:

a) do an overflow check before increasing the line count
b) limit the line count to UINT16_MAX
</content>
</entry>
<entry>
<title>render: protect against integer underflow when calculating scroll area</title>
<updated>2023-03-30T14:13:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-28T16:31:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7bc22862fa9536cb2f18b030209a95306e57360d'/>
<id>urn:sha1:7bc22862fa9536cb2f18b030209a95306e57360d</id>
<content type='text'>
When applying scroll damage, we calculate the affected region’s
height (in pixels), by subtracting the number of rows to scroll, from
the scrolling region, and finally multiply by the cell height.

If the number of rows to scroll is very large, the subtraction may
underflow, resulting in a very large height value instead of a
negative one.

This caused the check for "scrolling too many lines" to fail. That in
turn resulted in an integer overflow when calculating the source
offset into the rendered surface buffer, which typically triggered a
segfault.

This bug happened when there was continuous output in the terminal
without any new frames being rendered. This caused a buildup of scroll
damage, that triggered the underflow+overflow when we finally did
render a new frame.

For example, a compositor that doesn’t send any frame callbacks (for
example because the terminal window is minimized, or on a different
workspace/tag) would cause this.

Closes #1305
</content>
</entry>
<entry>
<title>input: (kitty kbd): the resulting UTF-8 string may translate to multiple UTF-32 codepoints</title>
<updated>2023-03-30T14:12:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-27T14:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3215d54f31c9e339598a34c9fa43f3dc3c5d1e42'/>
<id>urn:sha1:3215d54f31c9e339598a34c9fa43f3dc3c5d1e42</id>
<content type='text'>
When this happened (for example, by specifying a custom compose
sequence), the kitty keyboard protocol didn’t emit any text at all.

This was caused by the utf32 codepoint being -1. This in turned was
caused by us trying to convert the utf8 sequence to a *single* utf32
codepoint.

This patch replaces the use of mbrtoc32() with a call to
ambstoc32(), and the utf32 codepoint with an utf32 string.

The kitty keyboard protocol is updated:

* When determining if we’re dealing with text, check *all* codepoints
  in the utf32 string.

* Add support for multiple codepoints when reporting "associated
  text". The first codepoint is the actual parameter in the emitted
  sequence, and the remaining codepoints are sub-parameters. I.e. the
  codepoints are colon separated.

Closes #1288
</content>
</entry>
<entry>
<title>slave: set $TERM_PROGRAM and $TERM_PROGRAM_VERSION environment variables</title>
<updated>2023-03-20T14:40:36Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2023-03-20T14:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b2f02d826d8043b6b89860c56802ea5fed0f3bd'/>
<id>urn:sha1:5b2f02d826d8043b6b89860c56802ea5fed0f3bd</id>
<content type='text'>
These are already being set by iTerm2, WezTerm, tmux and likely some
others. Even though using yet more environment variables seems rather
questionable, if we don't set these we run the risk of inheriting them
from other terminals.

See also:

* https://gitlab.com/gnachman/iterm2/-/blob/97a6078df8e822da165e91737a01c0b9e115dd16/sources/PTYSession.m#L2568-2570
* https://github.com/tmux/tmux/blob/1d0f68dee9f71c504e03616fa472a408a6caa49b/environ.c#L263-L264
* https://github.com/search?q=TERM_PROGRAM&amp;type=code
</content>
</entry>
<entry>
<title>config: apply fontconfig rules if user didn’t set an explicit font size</title>
<updated>2023-03-06T17:02:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-03T16:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f3ce9236f9818263437cb6a4f26b20c5506a218'/>
<id>urn:sha1:9f3ce9236f9818263437cb6a4f26b20c5506a218</id>
<content type='text'>
If the user didn’t explicitly set the font size (e.g. font=monospace,
instead of font=monospace:size=12), our initial attempt to read the
FC_SIZE and FC_PIXEL_SIZE attributes will fail, and we used to
fallback to setting the size to 8pt.

Change this slightly, so that when we fail to read the FC_*_SIZE
attributes, apply the fontconfig rules, but *without expanding*
them (i.e. without calling FcDefaultSubstitute()).

Then try reading FC_*_SIZE again.

If that too fails, _then_ set size to 8pt. This allows us to pick up
rules that set a default {pixel}size:

    &lt;fontconfig&gt;
      &lt;match&gt;
        &lt;edit name="pixelsize" mode="append"&gt;&lt;double&gt;14&lt;/double&gt;&lt;/edit&gt;
    &lt;/fontconfig&gt;

Closes #1287
</content>
</entry>
<entry>
<title>key-binding: sort binding lists</title>
<updated>2023-03-03T17:29:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-02-27T16:56:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9a5a2d9957d8421b815d8ab07e867e73112b9591'/>
<id>urn:sha1:9a5a2d9957d8421b815d8ab07e867e73112b9591</id>
<content type='text'>
Sort bindings such that bindings with the same symbol are sorted with
the binding having the most modifiers comes first.

This fixes an issue where the “wrong” key binding are triggered when
used with “consumed” modifiers.

For example: if Control+BackSpace is bound before
Control+Shift+BackSpace, then the latter binding is never triggered.

Why? Because Shift is a consumed modifier. This means
Control+BackSpace is “the same” as Control+Shift+BackSpace.

By sorting bindings with more modifiers first, we work around the
problem. But note that it is *just* a workaround, and I’m not
confident there aren’t cases where it doesn’t work.

Closes #1280
</content>
</entry>
<entry>
<title>render: resize: call xdg_toplevel_set_min_size()</title>
<updated>2023-03-02T16:22:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-03-02T16:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=514fcc20a73feec88f9a912a8dedf7eac40ca55b'/>
<id>urn:sha1:514fcc20a73feec88f9a912a8dedf7eac40ca55b</id>
<content type='text'>
This is a hint to the compositor, not to set a smaller size than this.
</content>
</entry>
<entry>
<title>wayland: ignore configure events for unmapped surfaces</title>
<updated>2023-02-25T08:22:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-29T10:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f26914583a0114e102e4596763302a5bc6d1730'/>
<id>urn:sha1:7f26914583a0114e102e4596763302a5bc6d1730</id>
<content type='text'>
Closes #1249

Note that it is still unclear whether ack:ing a configure event for an
unmapped surface is a protocol violation, or something that should be
handled by the compositor.

According to
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/108,
Kwin, Mutter and Weston handles it, while wlroots does not.
</content>
</entry>
<entry>
<title>render: fix double-width glyphs glitching when surrounding cells overflow into it</title>
<updated>2023-01-17T18:43:47Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-01-15T13:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a9298959a188013530257a665d839a6343229b85'/>
<id>urn:sha1:a9298959a188013530257a665d839a6343229b85</id>
<content type='text'>
If cells overflowed (for example, by using an italic font that isn’t
truly monospaced) into a double-width glyph (that itself is *not*
overflowing), then the double-width glyph would glitch when being
rendered; typically the second half of it would occasionally
disappear.

This happened because we tried to rasterize the second cell of the
double-width glyph. This cell contains a special “spacer”
value. Rasterizing that typically results the font’s “not available”
glyph.

If _that_ glyph overflows, things broke; we’d later end up forcing a
re-render of it (thus erasing half the double-width glyph). But since
the double-width glyph _itself_ doesn’t overflow, _it_ wouldn’t be
re-rendered, leaving it half erased.

Fix by recognizing spacer cells, and not trying to rasterize them (set
glyph count to 0, and cell count to 1).

Closes #1256
</content>
</entry>
<entry>
<title>terminfo: sync with ncurses 2023-01-14</title>
<updated>2023-01-15T13:09:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-01-15T13:00:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d1220aebfd5814d53c49c814b8eaee456b5e9cf8'/>
<id>urn:sha1:d1220aebfd5814d53c49c814b8eaee456b5e9cf8</id>
<content type='text'>
* RV/rv: report DA2
* XR/xr: report version (XTVERSION)
* XF: boolean, focus in/out events available
</content>
</entry>
<entry>
<title>config: don’t double-free key binding auxiliary data</title>
<updated>2023-01-15T09:24:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-01-15T09:24:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=09f3475ad19753c5ca9dc8693b6937a7f75f7c5c'/>
<id>urn:sha1:09f3475ad19753c5ca9dc8693b6937a7f75f7c5c</id>
<content type='text'>
Key bindings with multiple key mappings share auxiliary data (e.g. the
command to execute in pipe-* bindings, or the escape sequence in
text-bindings).

The first one is the designated “master” copy. Only that one should be
freed.

This fixed a double-free on exit, with e.g.

  [text-bindings]
  \x1b\x23=Mod4+space Mod4+equal

Closes #1259
</content>
</entry>
<entry>
<title>changelog: amend terminfo names, in accordance with previous commit</title>
<updated>2023-01-01T15:21:17Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2023-01-01T15:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1d3023ec5e3a996ab3b0b031292e0fb101ce5900'/>
<id>urn:sha1:1d3023ec5e3a996ab3b0b031292e0fb101ce5900</id>
<content type='text'>
</content>
</entry>
<entry>
<title>terminfo: add entries for bracketed paste</title>
<updated>2023-01-01T14:07:02Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2023-01-01T09:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e7c1a93d29f6e6d3962d8444834a8b90f367170d'/>
<id>urn:sha1:e7c1a93d29f6e6d3962d8444834a8b90f367170d</id>
<content type='text'>
Ncurses added these in 2022-12-24, but they have been used/supported
by vim since 2017.

* BE - Bracketed paste Enable
* BD - Bracketed paste Disable
* PE - Paste Enable (i.e. "begin")
* PD - Paste Disable (i.e. "end")
</content>
</entry>
<entry>
<title>config: change default grapheme-width-method from wcswidth to double-width</title>
<updated>2023-01-01T09:29:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2022-12-16T15:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6259d59b4d82b0e8b7705759e04262130a3426c8'/>
<id>urn:sha1:6259d59b4d82b0e8b7705759e04262130a3426c8</id>
<content type='text'>
The old default, wcswidth, simply calls wcswidth() on the grapheme
cluster. This was supposedly the implementation with the highest
application compatibility. Except we never even tried to measure
it. It was just assumed.

A lot of modern applications have better implementations. Let’s try to
push support for better emoji support by changing our default method
from wcswith to double-width.

While far from correct (it’s not based on the Unicode tables), the
‘double-width’ method produces accurate results anyway.

double-width is like wcswidth(), in that it adds together the
individual wcwidths of all codepoints in the grapheme cluster. But, it
limits the maximum width to 2.
</content>
</entry>
</feed>
