<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/grid.c, branch 1.7.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.7.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-02-26T08:25:27Z</updated>
<entry>
<title>grid: snapshot: don’t mark all cells as dirty - copy state from source grid</title>
<updated>2021-02-26T08:25:27Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-26T08:25:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=792202bf2903025dcd91b1c6bf7b8195dca9a4bf'/>
<id>urn:sha1:792202bf2903025dcd91b1c6bf7b8195dca9a4bf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>csi: remove extra ‘;’</title>
<updated>2021-02-26T08:25:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-26T08:25:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ed47a65afccbe7967f610b93df64bc9ff4a7323a'/>
<id>urn:sha1:ed47a65afccbe7967f610b93df64bc9ff4a7323a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: snapshot: copy scroll damage</title>
<updated>2021-02-26T08:15:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-22T09:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a0f021b7dbf6b947d63087593610e1a53e13dbee'/>
<id>urn:sha1:a0f021b7dbf6b947d63087593610e1a53e13dbee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: grid_free(): free scroll damage list</title>
<updated>2021-02-26T08:15:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-22T09:31:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2cb624ee43889e66632776496b02d39fbc7d4d37'/>
<id>urn:sha1:2cb624ee43889e66632776496b02d39fbc7d4d37</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: add grid_snapshot()</title>
<updated>2021-02-26T08:15:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-22T09:21:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ae3ec52507c85395f90bf7c0ecc5b79affdc9b63'/>
<id>urn:sha1:ae3ec52507c85395f90bf7c0ecc5b79affdc9b63</id>
<content type='text'>
This function deep copies a grid into a newly *allocated* grid struct.
</content>
</entry>
<entry>
<title>grid: add grid_free()</title>
<updated>2021-02-26T08:15:45Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-22T09:20:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=bb74fe3f7de2b2e933eee9b0d36a811efabedb2e'/>
<id>urn:sha1:bb74fe3f7de2b2e933eee9b0d36a811efabedb2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow_uri_ranges(): URI end point is *inclusive*</title>
<updated>2021-02-25T19:54:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-25T19:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8ffa0f731b6a3bc11afef4cee78ef25f037fe168'/>
<id>urn:sha1:8ffa0f731b6a3bc11afef4cee78ef25f037fe168</id>
<content type='text'>
Which means, when we match URI start and end points against the
current column index, we must *not* use ‘if...else if’, but two
‘if... if’.

Fixes an assertion when resizing a window with an URI range of just
one cell.
</content>
</entry>
<entry>
<title>grid: refactor: break out allocation of ‘extra’ member to separate function</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a0b977fcee7a3095d548b6cb9131e77f16ac3770'/>
<id>urn:sha1:a0b977fcee7a3095d548b6cb9131e77f16ac3770</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: refactor: use grid_row_add_uri_range()</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:50:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d42b129814e120bf01ee3bfa06f399a81dec6c3d'/>
<id>urn:sha1:d42b129814e120bf01ee3bfa06f399a81dec6c3d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: add new function grid_row_add_uri_range()</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5eea06cff99abbac234d517e84e31576234c7e2e'/>
<id>urn:sha1:5eea06cff99abbac234d517e84e31576234c7e2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: resize_without_reflow: allocate ‘extra’ on-demand on ‘new’ rows</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fd505f2274343d03e26847217c68e3c8f1f86e30'/>
<id>urn:sha1:fd505f2274343d03e26847217c68e3c8f1f86e30</id>
<content type='text'>
Even if we have URI ranges on the old row, all those ranges may lay
outside the new grid’s range.
</content>
</entry>
<entry>
<title>grid: grid_resize_without_reflow: transfer URI ranges</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:42:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=8da82c897b82220bb96a55500e33b06850296c1e'/>
<id>urn:sha1:8da82c897b82220bb96a55500e33b06850296c1e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: translate URI ranges</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:34:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3ca5a65c339c1214d903e4b897f9b288a1083137'/>
<id>urn:sha1:3ca5a65c339c1214d903e4b897f9b288a1083137</id>
<content type='text'>
URI ranges are per row. Translate by detecting URI range start/end
coordinates, and opening and closing a corresponding URI range on the
new grid.

We need to take care when line-wrapping the new grid; here we need to
manually close the still-open URI ranges (on the new grid), and
re-opening them on the next row.
</content>
</entry>
<entry>
<title>grid: grid_row_free(): use grid_row_reset_extra()</title>
<updated>2021-02-21T19:15:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-14T19:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=17f90eeec44d272e926582d2bc4fae98c7073c5b'/>
<id>urn:sha1:17f90eeec44d272e926582d2bc4fae98c7073c5b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: enable rows to have ‘extra’ data associated with them</title>
<updated>2021-02-21T19:14:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T11:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fd87bca102321e5804fef74dac8a6d267ae46732'/>
<id>urn:sha1:fd87bca102321e5804fef74dac8a6d267ae46732</id>
<content type='text'>
This patch adds an ‘extra’ member to the row struct. It is a pointer
to a struct containing extra data to be associated with this row.

Initially, this struct contains a list of URL ranges. These
define (OSC-8) URLs on this row.

The ‘extra’ data is allocated on-demand. I.e. the pointer is NULL by
default; it is *not* allocated by grid_row_alloc().
</content>
</entry>
<entry>
<title>debug: rename assert() to xassert(), to avoid clashing with &lt;assert.h&gt;</title>
<updated>2021-01-16T20:16:00Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-01-16T20:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e56136ce1192d04a52b01ccb41284f0b7896430e'/>
<id>urn:sha1:e56136ce1192d04a52b01ccb41284f0b7896430e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Print stack trace on assert() failure or when calling fatal_error()</title>
<updated>2021-01-16T19:56:33Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-01-15T20:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9'/>
<id>urn:sha1:22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9</id>
<content type='text'>
Note: this uses the __sanitizer_print_stack_trace() function from the
AddressSanitizer runtime, so it only works when AddressSanitizer is
in use.
</content>
</entry>
<entry>
<title>grid: resize_without_reflow: don’t call min() on every loop iteration</title>
<updated>2020-11-25T19:33:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-25T19:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=434c8e41216e2abb08e51c3241bcd0a0e40a1ce6'/>
<id>urn:sha1:434c8e41216e2abb08e51c3241bcd0a0e40a1ce6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>resize: don’t reflow text on alt screen</title>
<updated>2020-11-25T06:47:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-11-24T18:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9a498038d681e65748b5223d814758a6b7a47693'/>
<id>urn:sha1:9a498038d681e65748b5223d814758a6b7a47693</id>
<content type='text'>
Alt screen applications normally reflow/readjust themselves on a
window resize.

When we do it too, the result is graphical glitches/flashes since our
re-flowed text is rendered in one frame, and the application re-flowed
text soon thereafter.

We can’t avoid rendering some kind of re-flowed frame, since we don’t
know when, or even if, the application will update itself. To avoid
glitches, we need to render, as closely as possible, what the
application itself will render shortly.

This is actually pretty simple; we just need to copy the visible
content over from the old grid to the new grid. We don’t bother with
text re-flow, but simply truncate long lines.

To simplify things, we simply cancel any active selection (since often
times, it will be corrupted anyway when the application redraws
itself).

Since we’re not reflowing text, there’s no need to translate e.g. the
cursor position - we just keep the current position (but bounded to
the new dimensions).

Fun thing: ‘less’ gets corrupted if we don’t leave the cursor at
the (new) bottom row. To handle this, we check if the cursor (before
resize) is at the bottom row, and if so, we move it to the new bottom
row.

Closes #221
</content>
</entry>
<entry>
<title>sixel: implement reflow</title>
<updated>2020-10-09T05:44:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-04T11:12:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=dbfc636ade8bd59a4a5af4531c19af8a163e8c09'/>
<id>urn:sha1:dbfc636ade8bd59a4a5af4531c19af8a163e8c09</id>
<content type='text'>
Move sixel reflow from grid_reflow() to sixel_reflow(). This lets us
use internal sixel functions to update the sixels.

Note that grid_reflow() still needs to remap the sixelss coordinates.
</content>
</entry>
</feed>
