<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/grid.c, branch 1.5.1</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.5.1</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.5.1'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-10-11T17:25:36Z</updated>
<entry>
<title>sixel: implement reflow</title>
<updated>2020-10-11T17:25:36Z</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=2e7afc615c4b3a32a383da2efad8e30dc3fd9eac'/>
<id>urn:sha1:2e7afc615c4b3a32a383da2efad8e30dc3fd9eac</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>
<entry>
<title>grid: reflow: re-insert sixels *after* new grid offset has been set</title>
<updated>2020-10-11T17:25:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-03T21:00:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c4b84249a883c001dfaaa753ba504baf54b7c217'/>
<id>urn:sha1:c4b84249a883c001dfaaa753ba504baf54b7c217</id>
<content type='text'>
Also make sure to destroy sixels that are too big to fit in the scrollback.

Fixes issues with the sixel list not being sorted correctly.
</content>
</entry>
<entry>
<title>grid: reflow: fix release build; ‘idx’ is only used in an assert()</title>
<updated>2020-10-11T17:23:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-24T16:53:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=661fa98cb203894c154869d47a228d44e6b74b9f'/>
<id>urn:sha1:661fa98cb203894c154869d47a228d44e6b74b9f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: handle viewport being too far down when enlarging the window</title>
<updated>2020-10-11T17:23:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-24T16:48:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0e9eea85af6bcc7d1c54435dc0b3c3f496827036'/>
<id>urn:sha1:0e9eea85af6bcc7d1c54435dc0b3c3f496827036</id>
<content type='text'>
If the viewport is close to the bottom, but not *at* the bottom, and
we’re enlarging the window, the translated viewport will be too far
down.
</content>
</entry>
<entry>
<title>grid: reflow: retain scrollback position</title>
<updated>2020-10-11T17:23:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-24T16:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b12ce3d7d787522a866658d01f606fdea66b0517'/>
<id>urn:sha1:b12ce3d7d787522a866658d01f606fdea66b0517</id>
<content type='text'>
Closes #142
</content>
</entry>
<entry>
<title>grid: reflow: make sure cursor is within the visible screen area</title>
<updated>2020-09-10T05:37:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-09T16:40:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a1ab31eea563dc4bee81bddd8d99a861712f6230'/>
<id>urn:sha1:a1ab31eea563dc4bee81bddd8d99a861712f6230</id>
<content type='text'>
Even though we translate the cursor position from the old grid
coordinates to the new, the cursor may _still_ end up outside the
visible area.

Make sure it doesn’t.
</content>
</entry>
<entry>
<title>grid: reflow: calculate width of composed characters correctly</title>
<updated>2020-09-06T17:14:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-09-06T17:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=61f950f77ac52779b5fcf34c628df4caee791af4'/>
<id>urn:sha1:61f950f77ac52779b5fcf34c628df4caee791af4</id>
<content type='text'>
Before this patch, reflow called `wcwidth()` on our magic values for
composed characters.
</content>
</entry>
<entry>
<title>Convert most dynamic allocations to use functions from xmalloc.h</title>
<updated>2020-08-08T19:37:57Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-08-08T19:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7a77958ba20c2b344be5e66e69e2f212a4bbf6b3'/>
<id>urn:sha1:7a77958ba20c2b344be5e66e69e2f212a4bbf6b3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: don't insert &lt;width&gt; spacer cells for *every* empty cell</title>
<updated>2020-08-04T16:07:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-04T16:07:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c07d14e1c095ac36b4a85ce5bc88f6ba15a4ad8d'/>
<id>urn:sha1:c07d14e1c095ac36b4a85ce5bc88f6ba15a4ad8d</id>
<content type='text'>
Only do it for the last, non-empty cell.
</content>
</entry>
<entry>
<title>grid: reflow: use macro print_spacer() to insert multi-column character spacers</title>
<updated>2020-07-14T18:29:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T18:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b0798ad0bed7dac45c167040644df6599cc390f0'/>
<id>urn:sha1:b0798ad0bed7dac45c167040644df6599cc390f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: handle multi column character spacers</title>
<updated>2020-07-14T15:04:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T15:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9ea42ef226cdc92c09470a522516a2209b986281'/>
<id>urn:sha1:9ea42ef226cdc92c09470a522516a2209b986281</id>
<content type='text'>
Ignore *old* cells containing spacers.

Pad new grid with spacers if a multi-column character doesn't fit at
the end of a line.

Insert spacers after a multi-column character.
</content>
</entry>
<entry>
<title>grid: reflow: always emit *all* cells of a multi-column character</title>
<updated>2020-07-14T10:15:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T10:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3fd61fa1203c9061394952a5efdc864b37d64cff'/>
<id>urn:sha1:3fd61fa1203c9061394952a5efdc864b37d64cff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: use width=1 for invalid characters</title>
<updated>2020-07-14T10:03:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T10:03:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=466466c19e6d4ddf6a90e6fb7f498225890cef4d'/>
<id>urn:sha1:466466c19e6d4ddf6a90e6fb7f498225890cef4d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: reflow: force line-wrap if a multi-column character does not fit on current line</title>
<updated>2020-07-14T09:03:33Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T09:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=803c87bb6565f09a60e4fa01c71bc1d43b4ebecd'/>
<id>urn:sha1:803c87bb6565f09a60e4fa01c71bc1d43b4ebecd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>reflow: ensure sixels are correctly sorted when re-inserted</title>
<updated>2020-06-29T19:59:40Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-29T19:59:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a136987678afcaa7b8ad22456a0632ee8a743943'/>
<id>urn:sha1:a136987678afcaa7b8ad22456a0632ee8a743943</id>
<content type='text'>
And make sure to remove re-inserted sixels that has wrapped around the
scrollback (this may happen when the window size decreases).
</content>
</entry>
<entry>
<title>grid: reflow: delete sixels that end up crossing the scrollback wrap around</title>
<updated>2020-06-27T18:16:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-27T18:16:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=deb61d20d82bdfc45af2aa51786fa500e53b84bb'/>
<id>urn:sha1:deb61d20d82bdfc45af2aa51786fa500e53b84bb</id>
<content type='text'>
Our sixel handling code requires sixels to *not* cross the scrollback
wrap around.

Until we've fixes the reflow code that split up such sixels (much like
we do when we generate a sixel), simply delete it.
</content>
</entry>
<entry>
<title>grid: add TODO, and an assert, that sixels must not cross wrap-around</title>
<updated>2020-06-27T13:34:54Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-27T13:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=644c8ef879cfae9666cce87f83936a38dad1d34d'/>
<id>urn:sha1:644c8ef879cfae9666cce87f83936a38dad1d34d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>grid: swap_row: remove unused parameter 'initialize'</title>
<updated>2020-05-16T21:43:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-16T21:43:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=57e04a1320f46eece193c3f807c8e058c4f3fb78'/>
<id>urn:sha1:57e04a1320f46eece193c3f807c8e058c4f3fb78</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode-combining: store seen combining chains "globally" in the term struct</title>
<updated>2020-05-03T09:03:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-03T09:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=62e07743194c8051334ed9b23be90ce31ab80773'/>
<id>urn:sha1:62e07743194c8051334ed9b23be90ce31ab80773</id>
<content type='text'>
Instead of storing combining data per cell, realize that most
combinations are re-occurring and that there's lots of available space
left in the unicode range, and store seen base+combining combinations
chains in a per-terminal array.

When we encounter a combining character, we first try to pre-compose,
like before. If that fails, we then search for the current
base+combining combo in the list of previously seen combinations. If
not found there either, we allocate a new combo and add it to the
list. Regardless, the result is an index into this array. We store
this index, offsetted by COMB_CHARS_LO=0x40000000ul in the cell.

When rendering, we need to check if the cell character is a plain
character, or if it's a composed character (identified by checking if
the cell character is &gt;= COMB_CHARS_LO).

Then we render the grapheme pretty much like before.
</content>
</entry>
<entry>
<title>unicode-combine: remove utf8proc dependency</title>
<updated>2020-05-02T15:29:00Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-02T15:29:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d945b68b734427a03d114716ff8aeac7998a7c57'/>
<id>urn:sha1:d945b68b734427a03d114716ff8aeac7998a7c57</id>
<content type='text'>
We only used utf8proc to try to pre-compose a glyph from a base and
combining character.

We can do this ourselves by using a pre-compiled table of valid
pre-compositions. This table isn't _that_ big, and binary searching it
is fast.

That is, for a very small amount of code, and not too much extra RO
data, we can get rid of the utf8proc dependency.
</content>
</entry>
</feed>
