diff options
| -rw-r--r-- | config.c | 20 | ||||
| -rw-r--r-- | doc/foot.ini.5.scd | 2 |
2 files changed, 20 insertions, 2 deletions
@@ -2230,7 +2230,25 @@ static bool modifiers_disjoint(const config_modifier_list_t *mods1, const config_modifier_list_t *mods2) { - return !modifiers_equal(mods1, mods2); + size_t count = 0; + tll_foreach(*mods1, it1) { + size_t skip = count; + tll_foreach(*mods2, it2) { + if (skip > 0) { + --skip; + continue; + } + + int r = strcmp(it1->item, it2->item); + if (r == 0) + return false; + if (r < 0) + break; + + ++count; + } + } + return true; } static char * NOINLINE diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd index c7fe22c7..8bedf451 100644 --- a/doc/foot.ini.5.scd +++ b/doc/foot.ini.5.scd @@ -1738,7 +1738,7 @@ _action=none_; e.g. *primary-paste=none*. of modifiers, e.g. _mod1+mod2+mod3_, as well as _none_) are used to enable selecting text with the mouse irrespective of whether a client application currently has the mouse grabbed. - These modifiers cannot be used as modifiers in mouse bindings. + Any combination of these modifiers cannot be used in mouse bindings. Because the order of bindings is significant, it is best to set this prior to any other mouse bindings that might use modifiers in the default set. |
