aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-02-26 00:24:39 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-03-04 12:50:27 -0500
commit8460924a7c8dfc401c40b11197f3ce8ddad88523 (patch)
tree181caf6d1ba490e5739cb893a25f76f2cfc468da /sway/commands.c
parentfix smart_borders description in manual (diff)
downloadsway-8460924a7c8dfc401c40b11197f3ce8ddad88523.tar.gz
sway-8460924a7c8dfc401c40b11197f3ce8ddad88523.tar.zst
sway-8460924a7c8dfc401c40b11197f3ce8ddad88523.zip
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/commands.c')
-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,
255 int argc; 255 int argc;
256 char **argv = split_args(cmd, &argc); 256 char **argv = split_args(cmd, &argc);
257 if (strcmp(argv[0], "exec") != 0 && 257 if (strcmp(argv[0], "exec") != 0 &&
258 strcmp(argv[0], "exec_always") != 0) { 258 strcmp(argv[0], "exec_always") != 0 &&
259 strcmp(argv[0], "mode") != 0) {
259 int i; 260 int i;
260 for (i = 1; i < argc; ++i) { 261 for (i = 1; i < argc; ++i) {
261 if (*argv[i] == '\"' || *argv[i] == '\'') { 262 if (*argv[i] == '\"' || *argv[i] == '\'') {