summaryrefslogtreecommitdiffstats
path: root/cmd-new-window.c
diff options
context:
space:
mode:
authornicm <nicm>2018-05-03 16:56:59 +0000
committernicm <nicm>2018-05-03 16:56:59 +0000
commite24a077752106189e932be29eb71fe7fc40089b6 (patch)
tree0bfbdeddbbd2871c4b1e97c6ae18583bf43acabf /cmd-new-window.c
parent896c1da7da82e2dab6957bc0ce0327176735b631 (diff)
Use window target if specified and exists even when looking for an
index, fixes neww -a with -t as well.
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r--cmd-new-window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index 4c9878ed..6517e99e 100644
--- a/cmd-new-window.c
+++ b/cmd-new-window.c
@@ -63,7 +63,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
struct environ_entry *envent;
struct cmd_find_state fs;
- if (args_has(args, 'a')) {
+ if (args_has(args, 'a') && wl != NULL) {
if ((idx = winlink_shuffle_up(s, wl)) == -1) {
cmdq_error(item, "no free window indexes");
return (CMD_RETURN_ERROR);