<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/vt.c, branch 1.6.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.6.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2020-12-16T14:06:34Z</updated>
<entry>
<title>vt: codespell: ony -&gt; only</title>
<updated>2020-12-16T14:06:34Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-16T14:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=69cd5fd3ab38fa98a62cae3a46edef0916dd84f5'/>
<id>urn:sha1:69cd5fd3ab38fa98a62cae3a46edef0916dd84f5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: don’t ignore extra private/intermediate characters</title>
<updated>2020-12-16T13:30:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-12-16T13:30:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2e137c0a7e747a781ec311c6aad656873072b96c'/>
<id>urn:sha1:2e137c0a7e747a781ec311c6aad656873072b96c</id>
<content type='text'>
Take ‘\E(#0’ for example - this is *not* the same as ‘\E(0’.

Up until now, foot has however treated them as the same escape,
because the handler for ‘\E(0’ didn’t verify there weren’t any _other_
private characters present.

Fix this by turning the ‘private’ array into a single 4-byte
integer. This allows us to match *all* privates with a single
comparison.

Private characters are added to the LSB first, and MSB last. This
means we can check for single privates in pretty much the same way as
before:

  switch (term-&gt;vt.private) {
  case ‘?’:
      ...
      break;
  }

Checking for two (or more) is much uglier, but foot only supports
a *single* escape with two privates, and no escapes with three or
more:

  switch (term-&gt;vt.private) {
  case 0x243f:  /* ‘?$’ */
      ...
      break;
  }

The ‘clear’ action remains simple (and fast), with a single write
operation.

Collecting privates is potentially _slightly_ more complex than
before; we now need mask and compare, instead of simply comparing,
when checking how many privates we already have.

We _could_ add a counter, which would make collecting privates easier,
but this would add an additional write to the ‘clean’ action which is
really bad since it’s in the hot path.
</content>
</entry>
<entry>
<title>bell: optionally render margins in red when receiving BEL</title>
<updated>2020-10-08T17:55:32Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-08T17:55:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7c6686221f328e9399eb679c246662c801b2356b'/>
<id>urn:sha1:7c6686221f328e9399eb679c246662c801b2356b</id>
<content type='text'>
Add anew config option, ‘bell=none|set-urgency’. When set to
‘set-urgency’, the margins will be painted in red (if the window did
not have keyboard focus).

This is intended as a cheap replacement for the ‘urgency’ hint, that
doesn’t (yet) exist on Wayland.

Closes #157
</content>
</entry>
<entry>
<title>vt: BS: *only* reset lcf if cursor is beyond right margin: don’t move cursor</title>
<updated>2020-10-02T19:40:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-10-02T19:40:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=377f1b7ad3176d12ae274ca9f3b26f7b764493c7'/>
<id>urn:sha1:377f1b7ad3176d12ae274ca9f3b26f7b764493c7</id>
<content type='text'>
This is needed to make reverse auto-wrap work correctly. Without it,
we’ll end up moving the cursor left one cell extra.
</content>
</entry>
<entry>
<title>vt: hide pedantic warnings around the VT state machine's switch cases</title>
<updated>2020-08-23T08:07:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-08-23T07:38:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9db78c3122fd3dcd87c1b60ea41f3ad74ff227ba'/>
<id>urn:sha1:9db78c3122fd3dcd87c1b60ea41f3ad74ff227ba</id>
<content type='text'>
The switch statements use the GCC extension "case X ... Y", and here
it doesn't really make any sense to convert it to "case X: case Y:",
so hide the warnings instead.
</content>
</entry>
<entry>
<title>Fix spelling mistake in vt.c</title>
<updated>2020-08-16T13:37:27Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2020-08-16T13:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=44499bbfe13c5e021949ed9cde2d109da17e5bfc'/>
<id>urn:sha1:44499bbfe13c5e021949ed9cde2d109da17e5bfc</id>
<content type='text'>
</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>vt: never call term_print() with a width &lt;= 0</title>
<updated>2020-07-16T06:04:12Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-16T06:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6f2cffd8c0949c2dfa1499c5d0c2594eb645ac26'/>
<id>urn:sha1:6f2cffd8c0949c2dfa1499c5d0c2594eb645ac26</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: ignore 0x7f (DEL) in ground state</title>
<updated>2020-07-16T06:01:37Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-16T06:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9508804b18270ab47c750dc61a16384297c06aa7'/>
<id>urn:sha1:9508804b18270ab47c750dc61a16384297c06aa7</id>
<content type='text'>
This ensures *all* bytes mapped to action_print() have wcwidth == 1.

DEL has wcwidth == -1, and would thus have been ignored by
term_print() anwyway.
</content>
</entry>
<entry>
<title>vt: utf8: handle multi-column spacer values correctly when combining</title>
<updated>2020-07-16T05:41:51Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-16T05:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6183f7f64a10465b429f70c713102ced2e0517bc'/>
<id>urn:sha1:6183f7f64a10465b429f70c713102ced2e0517bc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>term: rename COMB_CHARS_LO,HI -&gt; CELL_COMB_CHARS_LO,HI</title>
<updated>2020-07-14T14:41:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T14:41:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5c99e8013b3e8fb68e55250be550e856636ccf7b'/>
<id>urn:sha1:5c99e8013b3e8fb68e55250be550e856636ccf7b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: change HT (horizontal tab) to *not* clear LCF</title>
<updated>2020-07-14T08:47:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T08:47:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cabcc615c1b22101ce30121fcedee457a61559da'/>
<id>urn:sha1:cabcc615c1b22101ce30121fcedee457a61559da</id>
<content type='text'>
According to the specification, HT **should** clear LCF. However,
nearly all emulators do not. In particular, XTerm doesn't. So we
follow suite.
</content>
</entry>
<entry>
<title>term: rename term_formfeed() -&gt; term_carriage_return()</title>
<updated>2020-07-14T07:29:10Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T07:29:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b9719673a17618654b09bf9631e0ab65cf0d9def'/>
<id>urn:sha1:b9719673a17618654b09bf9631e0ab65cf0d9def</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: implement C0::FF - processed in the same way as C0::LF</title>
<updated>2020-07-14T07:18:52Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T07:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7f7ab00e11b2bc0ec238f86e37d66470f1bdb3de'/>
<id>urn:sha1:7f7ab00e11b2bc0ec238f86e37d66470f1bdb3de</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: process C0::VT the same way we process C0::LF</title>
<updated>2020-07-14T07:15:15Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T07:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4849a16f3719269e0cd9a70d782d542f70bf76bc'/>
<id>urn:sha1:4849a16f3719269e0cd9a70d782d542f70bf76bc</id>
<content type='text'>
Previously, C0::VT was implemented as a simple 'cursor down'. I.e. it
would behave as LF **until** it reached the bottom of the screen,
where instead of scrolling, it became a no-op.

See https://vt100.net/docs/vt102-ug/chapter5.html
</content>
</entry>
<entry>
<title>vt: sort C0's in the switch statement, and use escaped character possible</title>
<updated>2020-07-14T07:11:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-07-14T07:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=7357bb54ebaefbec4129a90db8a3691fcdcc2389'/>
<id>urn:sha1:7357bb54ebaefbec4129a90db8a3691fcdcc2389</id>
<content type='text'>
</content>
</entry>
<entry>
<title>unicode combining: don't log overflow errors unless LOG_ENABLE_DBG == 1</title>
<updated>2020-06-09T15:31:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-09T15:31:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=fb001ee7a72ae054fff742f66c7917e337a42d71'/>
<id>urn:sha1:fb001ee7a72ae054fff742f66c7917e337a42d71</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: utf8-print: check width == 0 first, when deciding whether to do combining</title>
<updated>2020-06-09T15:30:49Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-09T15:30:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=97221dd09b013c4ed67b11d6a7102232471c2114'/>
<id>urn:sha1:97221dd09b013c4ed67b11d6a7102232471c2114</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: initial version of UTF-8 decoding built-in into the VT parser</title>
<updated>2020-06-07T14:16:50Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-06-07T14:16:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9452aff0208f62716304022f4496bafbebdf50e9'/>
<id>urn:sha1:9452aff0208f62716304022f4496bafbebdf50e9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vt: utf8: use mbtowc() instead of mbrtowc()</title>
<updated>2020-05-31T10:41:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2020-05-31T10:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d9028b23944172cea94e70d5cf3d089e537716a5'/>
<id>urn:sha1:d9028b23944172cea94e70d5cf3d089e537716a5</id>
<content type='text'>
This is slightly faster, since we don't need to initialize an
mbstate_t struct (using mbrtowc() with a NULL-pointer for 'ps' also
works).

Also, avoid a branch by setting wc=0 and then ignoring the
result/error code from mbtowc().
</content>
</entry>
</feed>
