mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Handle commented lines.
This commit is contained in:
16
cfg.c
16
cfg.c
@ -1,4 +1,4 @@
|
||||
/* $Id: cfg.c,v 1.10 2008-06-19 21:13:56 nicm Exp $ */
|
||||
/* $Id: cfg.c,v 1.11 2008-06-19 21:20:24 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -78,17 +78,11 @@ load_cfg(const char *path, char **cause)
|
||||
}
|
||||
n++;
|
||||
|
||||
/* Trim spaces from start and end. */
|
||||
while (*buf != '\0' && (*buf == ' ' || *buf == '\t'))
|
||||
*buf++ = '\0';
|
||||
len = strlen(buf);
|
||||
while (len > 0 && (buf[len - 1] == ' ' || buf[len - 1] == '\t'))
|
||||
buf[--len] = '\0';
|
||||
if (*buf == '\0')
|
||||
continue;
|
||||
|
||||
if ((cmd = cmd_string_parse(buf, cause)) == NULL)
|
||||
if ((cmd = cmd_string_parse(buf, cause)) == NULL) {
|
||||
if (*cause == NULL)
|
||||
continue;
|
||||
goto error;
|
||||
}
|
||||
cfg_cause = NULL;
|
||||
|
||||
ctx.msgdata = NULL;
|
||||
|
Reference in New Issue
Block a user