From 7e81e58e7d1f540e448f3827751f75bf54b1fe9f Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 1 Sep 2018 11:45:48 +1000 Subject: 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`. --- sway/commands/bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway') diff --git a/sway/commands/bind.c b/sway/commands/bind.c index e73b0aea..b134c92f 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c @@ -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) { -- cgit v1.2.3