diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-28 22:29:51 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-03 13:22:14 +0200 |
| commit | efdca4894b0219d4e4f618f911863811a2d6711e (patch) | |
| tree | e4a1023ff9e75d1099be7270fa50f77be3e81450 | |
| parent | 9b9bb9130998e16ef75f4119cd02e52ed639c4ce (diff) | |
| download | vis-efdca4894b0219d4e4f618f911863811a2d6711e.tar.gz vis-efdca4894b0219d4e4f618f911863811a2d6711e.tar.xz | |
sam: fix default regexp handling i.e. ':sam x'
| -rw-r--r-- | sam.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -407,7 +407,7 @@ static Command *command_parse(Vis *vis, const char **s, int level, enum SamError cmd->count = parse_number(s); if (cmddef->flags & CMD_REGEX) { - if (cmddef->flags & CMD_REGEX_DEFAULT && **s == ' ') { + if ((cmddef->flags & CMD_REGEX_DEFAULT) && (!**s || **s == ' ')) { skip_spaces(s); } else if (!(cmd->regex = parse_regex(vis, s))) { *err = SAM_ERR_REGEX; |
