<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/terminal.c, branch 1.22.3</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.3</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.22.3'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2025-05-01T08:19:35Z</updated>
<entry>
<title>config: tweak.surface-bit-depth now defaults to 'auto'</title>
<updated>2025-05-01T08:19:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-05-01T06:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2a8948a3f32eaa6894457dcbf5aced57bdd91853'/>
<id>urn:sha1:2a8948a3f32eaa6894457dcbf5aced57bdd91853</id>
<content type='text'>
When set to 'auto', use 10-bit surfaces if gamma-correct blending is
enabled, and 8-bit surfaces otherwise.

Note that we may still fallback to 8-bit surfaces (without disabling
gamma-correct blending) if the compositor does not support 10-bit
surfaces.

Closes #2082
</content>
</entry>
<entry>
<title>Revert "term: append zero-width grapheme breaking characters to previous cell"</title>
<updated>2025-04-24T16:22:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-24T16:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1fec0cf5ea0c3fe3be92a49eaee5eef5aafa9c49'/>
<id>urn:sha1:1fec0cf5ea0c3fe3be92a49eaee5eef5aafa9c49</id>
<content type='text'>
This reverts commit 76503fb86a8b8a6b5c3ce1be87c15a55af38508d.
</content>
</entry>
<entry>
<title>Revert "term: ignore LTR+RTL markers  (U+200E + U+200F)"</title>
<updated>2025-04-24T16:20:18Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-24T16:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1b15cc5f3d633809114d9d569b34abf934426c69'/>
<id>urn:sha1:1b15cc5f3d633809114d9d569b34abf934426c69</id>
<content type='text'>
This reverts commit 70b324b24c86473a99528feb6f1f91ca70e11a02.
</content>
</entry>
<entry>
<title>term: ignore LTR+RTL markers  (U+200E + U+200F)</title>
<updated>2025-04-24T06:23:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-04-24T06:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=70b324b24c86473a99528feb6f1f91ca70e11a02'/>
<id>urn:sha1:70b324b24c86473a99528feb6f1f91ca70e11a02</id>
<content type='text'>
Foot doesn't implement RTL, and explicit LTR markers is neither
needed, nor used in anyway. In fact, they cause issues with font
lookup, as fcft often fails to find the marker codepoint in the
primary font, causing a fallback font to be used instead.

Closes #2049
</content>
</entry>
<entry>
<title>fcft: require fcft &gt;= 3.3.0, add support for new scaling-filters</title>
<updated>2025-03-12T09:03:06Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-12T09:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f11ba59efad352b1ff0bb11c0286942ae3d1edb'/>
<id>urn:sha1:7f11ba59efad352b1ff0bb11c0286942ae3d1edb</id>
<content type='text'>
Update tweak.scaling-filter to recognize the new scaling filters added
in fcft-3.3.0.

Since fcft_set_scaling_filter() is deprecated in 3.3.0, don't use it
anymore, and set the scaling filter via fcft_font_options instead.
</content>
</entry>
<entry>
<title>grid: change default value of linebreak to true</title>
<updated>2025-03-05T17:55:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-04T07:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7b6efcf19a10794dd7b41e30ce706eae3a290388'/>
<id>urn:sha1:7b6efcf19a10794dd7b41e30ce706eae3a290388</id>
<content type='text'>
This way, all lines are treated as having a hard linebreak, until it's
cleared when we do an auto-wrap.

This change alone causes issues when reflowing text, as now all
trailing lines in an otherwise empty window are treated as hard
linebreaks, causing the new grid to insert lots of unwanted, empty
lines.

Fix by doing two things:

* *clear* the linebreak flag when we pull in new lines for the new
  grid. We only want to set it explicitly, when an old row has its
  linebreak flag set.
* Coalesce empty lines with linebreak=true, and only "emit" them as
  new liens in the new grid if they are followed by non-empty lines.
</content>
</entry>
<entry>
<title>term: tweak linebreaking</title>
<updated>2025-03-05T17:55:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-28T07:11:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a80b32d006b24512bb8bd6c4d362f90abb4388d3'/>
<id>urn:sha1:a80b32d006b24512bb8bd6c4d362f90abb4388d3</id>
<content type='text'>
Don't set linebreak on linefeed. Instead, rely on the default value of
true, and that it is only cleared when a character is printed while
LCF=1.

Note that printing to a row that has linebreak cleared, will set the
linebreak flag again.
</content>
</entry>
<entry>
<title>render: gamma-correct blending</title>
<updated>2025-03-05T17:45:01Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-21T10:01:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ccf625b9914917e131beb83379c526bab1927edc'/>
<id>urn:sha1:ccf625b9914917e131beb83379c526bab1927edc</id>
<content type='text'>
This implements gamma-correct blending, which mainly affects font
rendering.

The implementation requires compile-time availability of the new
color-management protocol (available in wayland-protocols &gt;= 1.41),
and run-time support for the same in the compositor (specifically, the
EXT_LINEAR TF function and sRGB primaries).

How it works: all colors are decoded from sRGB to linear (using a
lookup table, generated in the exact same way pixman generates it's
internal conversion tables) before being used by pixman. The resulting
image buffer is thus in decoded/linear format. We use the
color-management protocol to inform the compositor of this, by tagging
the wayland surfaces with the 'ext_linear' image attribute.

Sixes: all colors are sRGB internally, and decoded to linear before
being used in any sixels. Thus, the image buffers will contain linear
colors. This is important, since otherwise there would be a
decode/encode penalty every time a sixel is blended to the grid.

Emojis: we require fcft &gt;= 3.2, which adds support for sRGB decoding
color glyphs. Meaning, the emoji pixman surfaces can be blended
directly to the grid, just like sixels.

Gamma-correct blending is enabled by default *when the compositor
supports it*. There's a new option to explicitly enable/disable it:
gamma-correct-blending=no|yes. If set to 'yes', and the compositor
does not implement the required color-management features, warning
logs are emitted.

There's a loss of precision when storing linear pixels in 8-bit
channels. For this reason, this patch also adds supports for 10-bit
surfaces. For now, this is disabled by default since such surfaces
only have 2 bits for alpha. It can be enabled with
tweak.surface-bit-depth=10-bit.

Perhaps, in the future, we can enable it by default if:

* gamma-correct blending is enabled
* the user has not enabled a transparent background
</content>
</entry>
<entry>
<title>term: reset the grapheme clustering state on cursor movements</title>
<updated>2025-03-04T06:50:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-03-04T06:50:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9e6d334bd8d8a565a7255f91ddb4de849563dbc5'/>
<id>urn:sha1:9e6d334bd8d8a565a7255f91ddb4de849563dbc5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: set_app_id(): app_id may be NULL, in which case we can't do strlen()</title>
<updated>2025-02-18T14:09:23Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-18T14:09:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9f9ffa94348905509083904f5d542481875b1b25'/>
<id>urn:sha1:9f9ffa94348905509083904f5d542481875b1b25</id>
<content type='text'>
Closes #1963
</content>
</entry>
<entry>
<title>term: append zero-width grapheme breaking characters to previous cell</title>
<updated>2025-02-16T08:13:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-16T06:25:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=76503fb86a8b8a6b5c3ce1be87c15a55af38508d'/>
<id>urn:sha1:76503fb86a8b8a6b5c3ce1be87c15a55af38508d</id>
<content type='text'>
When compiled with grapheme clustering support, zero-width characters
that also are grapheme breaks, were ignored (not stored in the
grid).

When utf8proc says the character is a grapheme break, we try to print
the character to the current cell. But this is only done when width &gt;
0. As a result, zero width grapheme breaks were simply discarded.

This only happens when grapheme clustering is enabled; when disabled,
all zero width characters are appended.

Fix this by also requiring the width to be non-zero when if we should
append the character or not.

Closes #1960
</content>
</entry>
<entry>
<title>term: print-non-ascii: propagate existing forced-width</title>
<updated>2025-02-06T13:02:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-03T14:31:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=98402040977435b0029dbe4952c083e65eb8ef69'/>
<id>urn:sha1:98402040977435b0029dbe4952c083e65eb8ef69</id>
<content type='text'>
When appending to an existing composed character, "inherit" its forced
width, if set.

Also make sure to actually _use_ the forced width, if set, rather than
the calculated width.

This fixes an issue when appending zero-width codepoints to a
forced-width combining character.
</content>
</entry>
<entry>
<title>term+vt: refactor: move "utf8" char processing to term_process_and_print_non_ascii()</title>
<updated>2025-02-06T06:45:20Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-26T06:33:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d3f692990ef66f550bb3a0ade2e84107cfbeca47'/>
<id>urn:sha1:d3f692990ef66f550bb3a0ade2e84107cfbeca47</id>
<content type='text'>
This function "prints" any non-ascii character (i.e. any character
that ends up in the action_utf8_print() function in vt.c) to the
grid. This includes grapheme cluster processing etc.

action_utf8_print() now simply calls this function.

This allows us to re-use the same functionality from other
places (like the text-sizing protocol).
</content>
</entry>
<entry>
<title>grid: reflow: handle composed characters longer than 2 cells</title>
<updated>2025-02-06T06:42:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-25T13:06:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1111f7e918a3b41512d11023ef5bf9585fa30eb4'/>
<id>urn:sha1:1111f7e918a3b41512d11023ef5bf9585fa30eb4</id>
<content type='text'>
The logic that tries to ensure we don't break a line in the middle of
a multi-cell character was flawed when the number of cells were larger
than 2.

In particular, if the number of cells to copy were limited by the
number of cells left on the current (new) line, and were less than the
length of the multi-cell character, then we failed to insert the
correct number of spacers, and also ended up misplacing the multi-cell
character; instead of pushing it to the next line, it was inserted on
the current line, even though it doesn't fit.

Also change how trailing SPACER cells are rendered (cells that are
"fillers" at then end of a line, when a multi-column character was
pushed over to the next line): don't copy the previous cell's
attributes (which may be wrong anyway), use default attributes
instead.
</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>term: ptmx pause/resume: don't modify the FDM if ptmx has been closed</title>
<updated>2025-02-05T10:39:06Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-02-05T10:39:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2fe72effa9870ee2d66aad56ce048960f933c96c'/>
<id>urn:sha1:2fe72effa9870ee2d66aad56ce048960f933c96c</id>
<content type='text'>
This fixes error message spam when resizing a terminal window executed
with --hold, and where the client application has terminated.
</content>
</entry>
<entry>
<title>Add support for the new Wayland protocol xdg-system-bell</title>
<updated>2025-01-17T09:21:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-17T09:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2a07a2e6b9a9565287996c51ceb2824b37d3fba7'/>
<id>urn:sha1:2a07a2e6b9a9565287996c51ceb2824b37d3fba7</id>
<content type='text'>
From the release notes:

    system bell - allowing e.g. terminal emulators to hand off system
    bell alerts to the compositor for among other things accessibility
    purposes

The new protocol is used when the new config option
bell.system=yes (and the compositor implements the protocol,
obviously).

The system bell is rung independent of whether the foot window has
keyboard focus or not (thus relying on compositor configuration to
determine whether anything should be done or not in response to the
bell).

The new option is enabled by default.
</content>
</entry>
<entry>
<title>term: cursor_refresh(): don't try to dirty the grid if we don't have one</title>
<updated>2025-01-09T06:56:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-09T06:49:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2c309227f1c20c23d75055935b4d705c275c3c94'/>
<id>urn:sha1:2c309227f1c20c23d75055935b4d705c275c3c94</id>
<content type='text'>
If the compositor sends a keyboard enter event before our window has
been mapped, foot crashes; the enter event triggers a cursor
refresh (hollow -&gt; non-hollow block cursor), which crashes since we
haven't yet allocated a grid.

Fix by no-op:ing the refresh if the window hasn't been configured yet.

Closes #1910
</content>
</entry>
<entry>
<title>terminal: Refresh only overlay when flash expires</title>
<updated>2025-01-09T06:53:50Z</updated>
<author>
<name>Alexander Orzechowski</name>
<email>alex@ozal.ski</email>
</author>
<published>2025-01-05T02:59:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c2add346ad5c1673ba0334264300e86eb50b2293'/>
<id>urn:sha1:c2add346ad5c1673ba0334264300e86eb50b2293</id>
<content type='text'>
If we call render_refresh, that will wait for a callback to the main
surface. In the case of a flash, the main surface might not get callbacks
if the compositor implements fancy culling optimizations like wlroots
wlr_scene compositors such as sway version &gt;=1.10.
</content>
</entry>
<entry>
<title>term: limit app-id to 2048 characters</title>
<updated>2025-01-02T07:58:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2025-01-02T07:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c7ab7b353996634c61abd7cd66d32459a6e3da4e'/>
<id>urn:sha1:c7ab7b353996634c61abd7cd66d32459a6e3da4e</id>
<content type='text'>
Unsure if the protocol imposes a limit (haven't found any
documentation), or if the issue is in the libwayland implementation,
or wlroots (triggers in at least sway+river).

The issue is that setting a too long app-id causes the
compositor (river at least) to peg the CPU at 100%, and stop sending
e.g. frame callbacks to foot.

Closes #1897
</content>
</entry>
</feed>
