<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/config.c, branch 1.10.2</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.2</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.10.2'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-11-23T18:50:05Z</updated>
<entry>
<title>config: add tweak.grapheme-width-method=max</title>
<updated>2021-11-23T18:50:05Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-22T22:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c1c0f11821e36e96add5060916d83533308b4126'/>
<id>urn:sha1:c1c0f11821e36e96add5060916d83533308b4126</id>
<content type='text'>
‘max’ is a new value for ‘tweak.grapheme-width-method’. When enabled,
the width of a grapheme cluster is that of the cluster’s widest
codepoint.
</content>
</entry>
<entry>
<title>config: argv_compare(): change parameters to ‘struct argv *’</title>
<updated>2021-11-21T17:04:36Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-21T17:04:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cdb2d90b893f35326146dbc657952265f1bf61ac'/>
<id>urn:sha1:cdb2d90b893f35326146dbc657952265f1bf61ac</id>
<content type='text'>
Instead of passing raw char** pointers to argv_compare(), pass
pointers to ‘struct argv’.

This lets argv_compare() handle both argv’s being NULL, or one of them
being NULL. That is, the caller no longer needs to check that both
argv’s are non-NULL before calling argv_compare().

Furthermore, update has_key_binding_collisions() to require the pipe
argv to match, in addition to matching the ‘action’, when allowing a
key collision.
</content>
</entry>
<entry>
<title>config: pipe_argv_from_value(): plug memory leak</title>
<updated>2021-11-21T16:51:46Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-21T16:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9174e6d79a1a57016973ef989ff9366b713b3f01'/>
<id>urn:sha1:9174e6d79a1a57016973ef989ff9366b713b3f01</id>
<content type='text'>
When parsing a key binding with a pipe-argv, we failed to free the
argv vector (or to be precise, the strdup:ed entries in the array)
when failing to parse the remainder of the binding.
</content>
</entry>
<entry>
<title>Merge branch 'fix-809'</title>
<updated>2021-11-21T16:45:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-21T16:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=106e14391f7e9749122a924a202aa297e495c8ce'/>
<id>urn:sha1:106e14391f7e9749122a924a202aa297e495c8ce</id>
<content type='text'>
Closes #809
</content>
</entry>
<entry>
<title>Merge branch 'remove-unreachable'</title>
<updated>2021-11-21T10:44:24Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-11-21T10:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c683116f8a41f74581c325ccff07c76dc9d81f81'/>
<id>urn:sha1:c683116f8a41f74581c325ccff07c76dc9d81f81</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: create a copy of the section name</title>
<updated>2021-11-21T09:55:57Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-21T09:55:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9b232e07f9b24a16d496939ec44c37fb772cd0b7'/>
<id>urn:sha1:9b232e07f9b24a16d496939ec44c37fb772cd0b7</id>
<content type='text'>
The parsing context keeps a pointer to the current section name. This
is used when logging errors.

However, the pointer was into a buffer allocated by getline(). This
buffer are often re-used in the next call to getline(), or free:d.

Regardless, the section name pointer is invalid after the next call to
getline(), which meant all error messages were logging a correct
section name.
</content>
</entry>
<entry>
<title>Fix parsing key-bindings config to not read past the end of the string.</title>
<updated>2021-11-21T04:49:01Z</updated>
<author>
<name>Arnavion</name>
<email>me@arnavion.dev</email>
</author>
<published>2021-11-21T04:49:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=31c1b91a7c215135ec1c4a64e39853db9377fd91'/>
<id>urn:sha1:31c1b91a7c215135ec1c4a64e39853db9377fd91</id>
<content type='text'>
pipe_argv_from_value itself stripped the cmd-to-exec from ctx-&gt;value,
so the callers should not be doing that themselves.

Fixes #809
</content>
</entry>
<entry>
<title>config: use stack allocation for temporary buffer in value_to_enum()</title>
<updated>2021-11-20T15:23:24Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-11-20T15:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e89e735995382de9b5dd8df5d1f45ed9f766f06a'/>
<id>urn:sha1:e89e735995382de9b5dd8df5d1f45ed9f766f06a</id>
<content type='text'>
The maximum size required for the string buffer is relatively small,
known at compile-time and not likely to ever grow beyond 512 bytes.
Therefore we may as well just use the stack.
</content>
</entry>
<entry>
<title>config: fix memory leak in value_to_enum()</title>
<updated>2021-11-20T15:12:56Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-11-20T15:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0db125a1253d2daa33d94c7f1a50b22eeb176be3'/>
<id>urn:sha1:0db125a1253d2daa33d94c7f1a50b22eeb176be3</id>
<content type='text'>
This could be triggered by running, for example:

    foot -o tweak.render-timer=invalid

For some reason LeakSanitizer was only detecting this leak when the
option value was invalid, even though it was occuring in either case.
</content>
</entry>
<entry>
<title>config: Simplify render-timer option handling</title>
<updated>2021-11-20T10:58:49Z</updated>
<author>
<name>Xiretza</name>
<email>xiretza@xiretza.xyz</email>
</author>
<published>2021-11-20T10:58:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=877c1e6f07df5110dd08d6c6aa01987ca1b46a24'/>
<id>urn:sha1:877c1e6f07df5110dd08d6c6aa01987ca1b46a24</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: Remove some "UNREACHABLE" UB footguns</title>
<updated>2021-11-20T10:58:44Z</updated>
<author>
<name>Xiretza</name>
<email>xiretza@xiretza.xyz</email>
</author>
<published>2021-11-19T15:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=02bb2768f176164099a30b74504c86e1accb7bb1'/>
<id>urn:sha1:02bb2768f176164099a30b74504c86e1accb7bb1</id>
<content type='text'>
Every branch of these long if/else if/else chains returns, so the
compiler can figure out on its own that the last line is never reached.

If, for some reason, one of the branches does not return (as was the
case after 205f1f7, fixed by b22322b), this would usually result in a compiler
error ("control reaches end of non-void function"), but adding UNREACHABLE
transforms this into silent undefined behaviour.
</content>
</entry>
<entry>
<title>config: letter-spacing: add missing ‘return’</title>
<updated>2021-11-15T18:22:06Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-15T18:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b22322bfd104949b93d1df22ff36689747917448'/>
<id>urn:sha1:b22322bfd104949b93d1df22ff36689747917448</id>
<content type='text'>
The missing return caused us to fall through to the bottom of the
function, where we ended with an error message:

  [main].letter-spacing: 0: not a valid option: letter-spacing

Closes #795
</content>
</entry>
<entry>
<title>user-notification: config: various small cleanups</title>
<updated>2021-11-14T15:16:32Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-11-14T15:08:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=759bc8007b2834bdfa7497f8d34ae2e30dd8064b'/>
<id>urn:sha1:759bc8007b2834bdfa7497f8d34ae2e30dd8064b</id>
<content type='text'>
* Rename user_notification_add() to user_notification_add_fmt()
* Add new user_notification_add() helper function
* Use xvasprintf() to replace user_notification_add_va()
* Make better use of helper functions in config.c
</content>
</entry>
<entry>
<title>config: remove options that were deprecated in 1.8.x</title>
<updated>2021-11-14T13:21:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-14T13:17:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0686f94b183033e5692577c4c474299e0010e566'/>
<id>urn:sha1:0686f94b183033e5692577c4c474299e0010e566</id>
<content type='text'>
* [main].bell
* [main].jump-label-letters
* [main].url-launch
* [main].osc8-underline
</content>
</entry>
<entry>
<title>config: add [colors].dim0-7</title>
<updated>2021-11-13T16:39:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-03T13:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c01904a2c75e962e5159dd42a640cce3d7370b13'/>
<id>urn:sha1:c01904a2c75e962e5159dd42a640cce3d7370b13</id>
<content type='text'>
This allows you to configure custom colors to be used when colors are
being dimmed (`\E[2m`).

It is implemented by color matching (just like
bold-text-in-bright=palette-based); the color-to-be-dimmed is matched
against the current color palette.

If it matches one of the regular colors (colors 0-7), the
corresponding “dim” color will be used.

If it matches one of the bright colors (colors 8-15), the
corresponding “regular” color will be used (but *only* if the “dim”
color has been set).

Otherwise, the color is dimmed by reducing its luminance.

The default behavior, i.e. when dim0-7 hasn’t been configured, is to
dim by reducing luminance for *all* colors. I.e. we don’t do any color
matching at all. In particular, this means that dimming a bright color
will *not* result in the corresponding “regular” color.

Closes #776
</content>
</entry>
<entry>
<title>config: scrollback.indicator.text: use value_to_wchars()</title>
<updated>2021-11-13T11:40:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-13T11:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=c0e67e7c2fd8028ddabd164a0eb2938c03d6c6f1'/>
<id>urn:sha1:c0e67e7c2fd8028ddabd164a0eb2938c03d6c6f1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: value_to_wchars(): free the target variable</title>
<updated>2021-11-13T10:04:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-06T19:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=73c5754f5d4c7d6588a4acf635723e69eac7bf76'/>
<id>urn:sha1:73c5754f5d4c7d6588a4acf635723e69eac7bf76</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: appease compiler</title>
<updated>2021-11-13T10:04:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-06T13:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2f0ab1da89de0a9db47b41863ddd822216707726'/>
<id>urn:sha1:2f0ab1da89de0a9db47b41863ddd822216707726</id>
<content type='text'>
../../foot/config.c:154:50: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
    log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg);
                                                 ^~~~~~~~~~~~~
../../foot/config.c:154:50: note: treat the string as an argument to avoid this
    log_msg(log_class, LOG_MODULE, file, lineno, formatted_msg)
</content>
</entry>
<entry>
<title>config: drop all warning logs from the tweak section</title>
<updated>2021-11-13T10:04:30Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-06T12:44:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=d4b9ef7607fd1f410f9cadbb2456458e214e4834'/>
<id>urn:sha1:d4b9ef7607fd1f410f9cadbb2456458e214e4834</id>
<content type='text'>
</content>
</entry>
<entry>
<title>config: value_to_enum(), return conversion success/failure as a bool</title>
<updated>2021-11-13T10:04:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-11-06T12:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=1f39c46c17fa3fab9384b28b304e838b2e30a086'/>
<id>urn:sha1:1f39c46c17fa3fab9384b28b304e838b2e30a086</id>
<content type='text'>
Result is set through a pointer passed as an argument. Note that we
assume enums are 32-bit, and explicitly cast them to int*.

Static asserts have been added to ensure this invariant holds.
</content>
</entry>
</feed>
