aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/bind.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-01 11:45:48 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-01 11:45:48 +1000
commit7e81e58e7d1f540e448f3827751f75bf54b1fe9f (patch)
tree924c61d27afcd3120f99137662d8f83a39769d1e /sway/commands/bind.c
parentFix crash on reload (diff)
downloadsway-7e81e58e7d1f540e448f3827751f75bf54b1fe9f.tar.gz
sway-7e81e58e7d1f540e448f3827751f75bf54b1fe9f.tar.zst
sway-7e81e58e7d1f540e448f3827751f75bf54b1fe9f.zip
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`.
Diffstat (limited to 'sway/commands/bind.c')
-rw-r--r--sway/commands/bind.c2
1 files changed, 1 insertions, 1 deletions
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)
310 bool reload = false; 310 bool reload = false;
311 // if this is a reload command we need to make a duplicate of the 311 // if this is a reload command we need to make a duplicate of the
312 // binding since it will be gone after the reload has completed. 312 // binding since it will be gone after the reload has completed.
313 if (strncasecmp(binding->command, "reload", 6) == 0) { 313 if (strcasestr(binding->command, "reload")) {
314 reload = true; 314 reload = true;
315 binding_copy = sway_binding_dup(binding); 315 binding_copy = sway_binding_dup(binding);
316 if (!binding_copy) { 316 if (!binding_copy) {