mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
Only strip comments at the start of a line
This is necessary because i3 config files use CSS notation for colors (i.e. #rrggbb).
This commit is contained in:
parent
ef91764bc7
commit
5a369b3132
2 changed files with 5 additions and 23 deletions
|
|
@ -207,7 +207,10 @@ bool read_config(FILE *file, bool is_active) {
|
|||
while (!feof(file)) {
|
||||
line = read_line(file);
|
||||
line_number++;
|
||||
line = strip_comments(line);
|
||||
line = strip_whitespace(line);
|
||||
if (line[0] == '#') {
|
||||
continue;
|
||||
}
|
||||
struct cmd_results *res = config_command(line);
|
||||
switch(res->status) {
|
||||
case CMD_FAILURE:
|
||||
|
|
@ -261,8 +264,7 @@ bool read_config(FILE *file, bool is_active) {
|
|||
return success;
|
||||
}
|
||||
|
||||
int output_name_cmp(const void *item, const void *data)
|
||||
{
|
||||
int output_name_cmp(const void *item, const void *data) {
|
||||
const struct output_config *output = item;
|
||||
const char *name = data;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue