<feed xmlns='http://www.w3.org/2005/Atom'>
<title>term.git/src/snapshot.c, branch main</title>
<subtitle>[no description]</subtitle>
<id>https://git.wsap.dev/term.git/atom?h=main</id>
<link rel='self' href='https://git.wsap.dev/term.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/'/>
<updated>2026-10-15T10:04:01+00:00</updated>
<entry>
<title>Rename the library to wsap_vtcore</title>
<updated>2026-10-15T10:04:01+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T10:04:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=dcebf9c7f954a55350b68d0ead1935612c4e2e05'/>
<id>urn:sha1:dcebf9c7f954a55350b68d0ead1935612c4e2e05</id>
<content type='text'>
ncurses installs &lt;term.h&gt; and defines struct term. In a file that
includes both headers, an ncurses TERMINAL * and this library's terminal
are silently the same type. The name wsap_vtcore avoids the clash.

The public header is now &lt;wsap_vtcore/wsap_vtcore.h&gt;. Every global
symbol uses the wsap_vtcore_ prefix, every macro uses WSAP_VTCORE_, and
the shared library is libwsap_vtcore.so.0. The default terminal name is
now "wsap_vtcore". The ISA override variable is WSAP_VTCORE_ISA.

No other behavior changes. The amalgamation writes wsap_vtcore.c and
wsap_vtcore.h.

Co-Authored-By: Claude Haiku 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Convert each changed snapshot row once</title>
<updated>2026-10-15T09:53:42+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=bd8222e615134c3ec5e7a07b6b1fa97c9bd4a471'/>
<id>urn:sha1:bd8222e615134c3ec5e7a07b6b1fa97c9bd4a471</id>
<content type='text'>
The atomic update counted arena words by converting every changed row in
phase 1, then converted it again in apply(). A history row is decoded on
each conversion, so paging through history took 74% longer, and a full
redraw 20% longer.

A changed row is now converted once. Small updates reserve the arena for
the most their rows can add, then convert in apply() straight into the
cells, as before. Larger updates and rebuilds convert into a stage in
phase 1, with cluster records after the live ones or in a spare arena,
and apply() copies the smaller of the kept and staged parts, swapping
the stage in when that saves the copy. A failed update still changes
nothing a reader sees.

A row that scrolls in from below no longer counts as kept when its new
key is 0.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Report selection allocation failure instead of truncating</title>
<updated>2026-10-15T09:42:11+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:42:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=6d2dc774947787dcef73a3251d1e9ec51bc526df'/>
<id>urn:sha1:6d2dc774947787dcef73a3251d1e9ec51bc526df</id>
<content type='text'>
On a screen taller than 256 rows the selection's row list is allocated.
When that failed, it fell back to the 256-entry stack array, so the
selection and the snapshot's selection spans silently stopped at row
256 while every call still reported success.

lines_init() now reports the failure. term_select_start() and
term_select_extend() return false and leave the selection unchanged,
term_snapshot_update() fails and keeps its previous content, and the
text getters return NULL, as they do for their other allocations.

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'wt/snapshot-atomic' into api-hardening</title>
<updated>2026-10-15T09:39:21+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:39:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=ca69844a243a6e335b0ddafad057f35e89e0a576'/>
<id>urn:sha1:ca69844a243a6e335b0ddafad057f35e89e0a576</id>
<content type='text'>
# Conflicts:
#	src/snapshot.c
</content>
</entry>
<entry>
<title>Merge branch 'wt/namespace' into api-hardening</title>
<updated>2026-10-15T09:38:58+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:38:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=22345caf457e8d9a4bdb56b696cc5f3694812276'/>
<id>urn:sha1:22345caf457e8d9a4bdb56b696cc5f3694812276</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Keep the snapshot unchanged when an update fails</title>
<updated>2026-10-15T09:38:32+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=4c72f7b02fbafd15d0cf843edece106714bcc5f7'/>
<id>urn:sha1:4c72f7b02fbafd15d0cf843edece106714bcc5f7</id>
<content type='text'>
term_snapshot_update converted the viewport in place, so an allocation
that failed midway left the snapshot empty and a renderer painted a blank
frame. Split the update into two phases. Phase 1 makes every allocation
the update needs and counts the arena words the converted rows add, then
grows the arena once. Phase 2 writes the view, cells, keys, clusters, and
selection, and cannot fail. A failed update now keeps the previous
content, and a retry is an ordinary incremental update.

invalidate() is removed. The term_snapshot_update comment and the
correctness audit now say the snapshot keeps its previous content.

The failure test fails each allocation in turn from the same starting
state. After every failed call it compares the view, cells, row keys,
selection spans, and cluster code points with the state before the call.
A retry must succeed and match a fresh capture. The cases are a first
update, a 32 by 16 screen of ZWJ families and regional-indicator flags
(arena growth), a resize, a 300-row screen (scratch arrays), and a long
scroll run.

Co-Authored-By: Claude Haiku 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Keep installed headers from shadowing or polluting host names</title>
<updated>2026-10-15T09:31:21+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=212f1cc9109aa0deb9e5d990bb2dba2b167618fb'/>
<id>urn:sha1:212f1cc9109aa0deb9e5d990bb2dba2b167618fb</id>
<content type='text'>
The pkg-config file put include/term on the host's include path, so
ncurses' term.h could be picked up in place of ours. Hosts now write
&lt;term/term.h&gt; and the package adds only its include directory.

The installed Unicode API had unprefixed names that collide with host
symbols and macros. Rename them: term_ for functions, types, and static
tables, TERM_ for macros and include guards. unicode_data.inc and
tools/generate_unicode.py are renamed to match. The generator's inputs
here are Unicode 15.1 and the checked-in table is 18.0.0, so the table
data was not regenerated. Only the declarations were checked against
the generator.

utf8.h casts the malloc result so it compiles as C++.

header_test.sh now includes &lt;term/term.h&gt; with only include/ on the path.
It also checks that a host which defines unicode_width, UTF8_ACCEPT,
GRAPHEME_MAX_LEN, in_ranges, and similar names compiles with the Unicode
headers as C11 and C++, in both declaration orders.

Co-Authored-By: Claude Haiku 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Document snapshot pointer lifetimes and make getters NULL-safe</title>
<updated>2026-10-15T09:28:35+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:28:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=1924e4e0c9c863b641f08224f740feb51bf1bc7d'/>
<id>urn:sha1:1924e4e0c9c863b641f08224f740feb51bf1bc7d</id>
<content type='text'>
The snapshot getters crashed on a NULL snapshot, unlike the rest of the
API. They now return NULL, an empty span, 0, or write nothing, as the
terminal functions do. term_snapshot_cluster writes nothing when cps is
NULL or cap is 0.

Document that the view and its palette keep their address for the life
of the snapshot, and that a row pointer lasts only until the next update
or free, since an update can realloc the cell array.

Rename the term_input.h include guard to TERM_INPUT_H to match the file.

Co-Authored-By: Claude Haiku 5.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Return owned text and share cell attribute flags with snapshots</title>
<updated>2026-10-15T08:37:31+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T08:37:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=af6a37b1c4509c7766933a7cb45d2ee9a3a23f98'/>
<id>urn:sha1:af6a37b1c4509c7766933a7cb45d2ee9a3a23f98</id>
<content type='text'>
Make text queries return allocated strings released with term_text_free, keeping each capture atomic. Align public attributes with the write core, remove snapshot conversion tables, and migrate tests and the Kitty adapter.
</content>
</entry>
<entry>
<title>Fix snapshot storage and allocation failure correctness</title>
<updated>2026-10-15T08:31:50+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T08:31:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=acd338ea33de36d223cc6d301712eed4a9501e6c'/>
<id>urn:sha1:acd338ea33de36d223cc6d301712eed4a9501e6c</id>
<content type='text'>
Account for cluster records discarded by snapshot scrolling, propagate snapshot allocation failures with an empty retryable view, and allocate resized screens before mutating visible state. Add bounded-memory and allocation-failure regressions, and update the saved diagnostic and audit report.
</content>
</entry>
</feed>
