aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-02-26 00:24:39 -0500
committeremersion <contact@emersion.fr>2019-02-26 08:06:50 +0100
commitefe370ba1220b11d5c736b23cb109d47483878d2 (patch)
tree2b3b137da07ce6d5c3a6d95d46b79d70ea138d26 /sway
parentb00b0fb9d342ea42a0d15d258206c196b5ef9140 (diff)
downloadsway-efe370ba1220b11d5c736b23cb109d47483878d2.tar.xz
execute_command: do not strip qoutes for cmd_mode
`cmd_mode` performs its own quote stripping for the mode string to avoid double stripping quotes for `cmd_bindcode` and `cmd_bindsym` in `config_command` and `execute_command`. Stripping quotes in `execute_command` for `cmd_mode` will also result in double stripping, which will cause issues for any mode string with spaces, such as pango markup.
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 3fc4f86e..522a5fd4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -255,7 +255,8 @@ list_t *execute_command(char *_exec, struct sway_seat *seat,
int argc;
char **argv = split_args(cmd, &argc);
if (strcmp(argv[0], "exec") != 0 &&
- strcmp(argv[0], "exec_always") != 0) {
+ strcmp(argv[0], "exec_always") != 0 &&
+ strcmp(argv[0], "mode") != 0) {
int i;
for (i = 1; i < argc; ++i) {
if (*argv[i] == '\"' || *argv[i] == '\'') {