mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
Allow reload command to exist anywhere in the command string
This fixes a crash if you have commands where reload appears in the middle or at the end, such as `bindsym r mode default, reload`.
This commit is contained in:
parent
ebe65a4d48
commit
7e81e58e7d
3 changed files with 17 additions and 1 deletions
|
|
@ -310,7 +310,7 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding)
|
|||
bool reload = false;
|
||||
// if this is a reload command we need to make a duplicate of the
|
||||
// binding since it will be gone after the reload has completed.
|
||||
if (strncasecmp(binding->command, "reload", 6) == 0) {
|
||||
if (strcasestr(binding->command, "reload")) {
|
||||
reload = true;
|
||||
binding_copy = sway_binding_dup(binding);
|
||||
if (!binding_copy) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue