<feed xmlns='http://www.w3.org/2005/Atom'>
<title>term.git/tests/snapshot_failure_test.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>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>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>Fix snapshot failure test under LTO</title>
<updated>2026-10-15T09:04:04+00:00</updated>
<author>
<name>Berke Güzel</name>
<email>wenekar1@gmail.com</email>
</author>
<published>2026-10-15T09:04:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.wsap.dev/term.git/commit/?id=5f03033b0e211f9ed13e7a1351f9a8f9011ab665'/>
<id>urn:sha1:5f03033b0e211f9ed13e7a1351f9a8f9011ab665</id>
<content type='text'>
</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>
