Fix negative window index range check (> not <). Reported by Juan Pablo

in GitHub issue 1283.
This commit is contained in:
nicm 2018-03-17 16:48:17 +00:00
parent f87d80737e
commit 0b3911631b

View File

@ -390,7 +390,7 @@ cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
return (-1); return (-1);
fs->idx = s->curw->idx + n; fs->idx = s->curw->idx + n;
} else { } else {
if (n < s->curw->idx) if (n > s->curw->idx)
return (-1); return (-1);
fs->idx = s->curw->idx - n; fs->idx = s->curw->idx - n;
} }