summaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 4d0da26e..333af1b4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1872,16 +1872,16 @@ static struct cmd_results *cmd_font(int argc, char **argv) {
1872 } 1872 }
1873 1873
1874 char *font = join_args(argv, argc); 1874 char *font = join_args(argv, argc);
1875 free(config->font);
1875 if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) { 1876 if (strlen(font) > 6 && strncmp("pango:", font, 6) == 0) {
1876 free(config->font); 1877 config->font = strdup(font + 6);
1877 config->font = font;
1878 sway_log(L_DEBUG, "Settings font %s", config->font);
1879 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
1880 } else {
1881 free(font); 1878 free(font);
1882 return cmd_results_new(CMD_FAILURE, "font", "non-pango font detected"); 1879 } else {
1880 config->font = font;
1883 } 1881 }
1884 1882
1883 sway_log(L_DEBUG, "Settings font %s", config->font);
1884 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
1885} 1885}
1886 1886
1887 1887