diff options
author | 2019-08-14 09:59:43 +0000 | |
---|---|---|
committer | 2019-08-14 09:59:43 +0000 | |
commit | 02fc90dc8e110c075ee535a264ff83e683f8f168 (patch) | |
tree | 649821ad50e6674ea67fe0582e110270fbe4edb1 | |
parent | Add -Z flag to rotate-window, select-pane, swap-pane, switch-client to (diff) | |
download | wireguard-openbsd-02fc90dc8e110c075ee535a264ff83e683f8f168.tar.xz wireguard-openbsd-02fc90dc8e110c075ee535a264ff83e683f8f168.zip |
Revert a change I did not mean to commit yet.
-rw-r--r-- | usr.bin/tmux/window-copy.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index b4b7bb88c98..f713ef27471 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.231 2019/08/14 09:58:31 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.232 2019/08/14 09:59:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1638,11 +1638,9 @@ window_copy_cmd_search_backward(struct window_copy_cmd_state *cs) const char *argument = cs->args->argv[1]; if (*argument != '\0') { + data->searchtype = WINDOW_COPY_SEARCHUP; free(data->searchstr); data->searchstr = xstrdup(argument); - } - if (data->searchstr != NULL) { - data->searchtype = WINDOW_COPY_SEARCHUP; for (; np != 0; np--) window_copy_search_up(wme); } @@ -1658,11 +1656,9 @@ window_copy_cmd_search_forward(struct window_copy_cmd_state *cs) const char *argument = cs->args->argv[1]; if (*argument != '\0') { + data->searchtype = WINDOW_COPY_SEARCHDOWN; free(data->searchstr); data->searchstr = xstrdup(argument); - } - if (data->searchstr != NULL) { - data->searchtype = WINDOW_COPY_SEARCHDOWN; for (; np != 0; np--) window_copy_search_down(wme); } @@ -2143,7 +2139,10 @@ window_copy_search_jump(struct window_mode_entry *wme, struct grid *gd, return (0); } -/* Search in text. If direction is 0 then search up, otherwise down. */ +/* + * Search in for text searchstr. If direction is 0 then search up, otherwise + * down. + */ static int window_copy_search(struct window_mode_entry *wme, int direction) { |