Blame tmux-2.5-fail-on-no-target.diff
|
Filipe Rosset |
8357d2 |
--- a/cmd-find.c
|
|
Filipe Rosset |
8357d2 |
+++ a/cmd-find.c
|
|
Filipe Rosset |
8357d2 |
@@ -977,8 +977,11 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
|
|
Filipe Rosset |
8357d2 |
} else if (cmd_find_from_client(¤t, item->client) == 0) {
|
|
Filipe Rosset |
8357d2 |
fs->current = ¤t;
|
|
Filipe Rosset |
8357d2 |
log_debug("%s: current is from client", __func__);
|
|
Filipe Rosset |
8357d2 |
- } else
|
|
Filipe Rosset |
8357d2 |
+ } else {
|
|
Filipe Rosset |
8357d2 |
+ if (~flags & CMD_FIND_QUIET)
|
|
Filipe Rosset |
8357d2 |
+ cmdq_error(item, "no current target");
|
|
Filipe Rosset |
8357d2 |
goto error;
|
|
Filipe Rosset |
8357d2 |
+ }
|
|
Filipe Rosset |
8357d2 |
if (!cmd_find_valid_state(fs->current))
|
|
Filipe Rosset |
8357d2 |
fatalx("invalid current find state");
|
|
Filipe Rosset |
8357d2 |
|