diff --git a/docs/changelog.md b/docs/changelog.md index 97692834c..bbb2728f3 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -11,7 +11,8 @@ usually the best available version. As features stabilize some brief notes about them will accumulate here. -* Not yet +#### Fixed +* [ActivateKeyTable](config/lua/keyassignment/ActivateKeyTable.md)'s `replace_current` field was not actually optional. Made it optional. [#2179](https://github.com/wez/wezterm/issues/2179) ### 20220624-141144-bd1b7c5d diff --git a/docs/config/lua/keyassignment/ActivateKeyTable.md b/docs/config/lua/keyassignment/ActivateKeyTable.md index 7211aaa4b..2a6f01a61 100644 --- a/docs/config/lua/keyassignment/ActivateKeyTable.md +++ b/docs/config/lua/keyassignment/ActivateKeyTable.md @@ -11,4 +11,4 @@ The following parameters are possible: * `name` - the name of the table to activate. The name must match up to an entry in the `key_tables` configuration. * `timeout_milliseconds` - an optional duration expressed in milliseconds. If specified, then the activation will automatically expire and pop itself from the key table stack once that duration elapses. If omitted, this activation will not expire due to time. * `one_shot` - an optional boolean that controls whether the activation will pop itself after a single additional key press. The default if left unspecified is `one_shot=true`. When set to `false`, pressing a key will not automatically pop the activation and you will need to use either a timeout or an explicit key assignment that triggers [PopKeyTable](PopKeyTable.md) to cancel the activation. -* `replace_current` - an optional boolean. If set to true then behave as though [PopKeyTable](PopKeyTable.md) was triggered before pushing this new activation on the stack. This is most useful for key assignments in a table that was activated using `one_shot=false`. +* `replace_current` - an optional boolean. Defaults to `false` is unspecified. If set to `true` then behave as though [PopKeyTable](PopKeyTable.md) was triggered before pushing this new activation on the stack. This is most useful for key assignments in a table that was activated using `one_shot=false`. diff --git a/wezterm-dynamic/derive/src/fromdynamic.rs b/wezterm-dynamic/derive/src/fromdynamic.rs index 1aec1ff8c..7a2ef1577 100644 --- a/wezterm-dynamic/derive/src/fromdynamic.rs +++ b/wezterm-dynamic/derive/src/fromdynamic.rs @@ -205,19 +205,8 @@ fn derive_enum(input: &DeriveInput, enumeration: &DataEnum) -> Result::from_dynamic( - obj.get_by_str(#name).unwrap_or(&Value::Null), - options - ).map_err(|source| source.field_context( - #literal, - #name, - obj - ))?, - ) + let info = attr::field_info(f).unwrap(); + info.from_dynamic(&literal) }) .collect::>();