diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-03-15 07:28:41 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-03-15 07:52:56 +0100 |
| commit | 9fd9b1810c445e31d4599eb72e2fce3e67aa9c4c (patch) | |
| tree | 3107990bbe164c9192921dcf72149d64c9aeddb0 /sam.c | |
| parent | 34f13978633d6bb63fb843e86b72ed13117386c9 (diff) | |
| download | vis-9fd9b1810c445e31d4599eb72e2fce3e67aa9c4c.tar.gz vis-9fd9b1810c445e31d4599eb72e2fce3e67aa9c4c.tar.xz | |
sam: fix X and Y commands which were interchanged
Fix #820
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1558,8 +1558,8 @@ static bool cmd_files(Vis *vis, Win *win, Command *cmd, const char *argv[], Sele for (Win *win = vis->windows; win; win = win->next) { if (win->file->internal) continue; - bool match = !cmd->regex || (win->file->name && - text_regex_match(cmd->regex, win->file->name, 0)); + bool match = !cmd->regex || + (win->file->name && text_regex_match(cmd->regex, win->file->name, 0) == 0); if (match ^ (argv[0][0] == 'Y')) { Filerange def = text_range_new(0, 0); ret &= sam_execute(vis, win, cmd->cmd, NULL, &def); |
