aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2017-05-12 10:45:38 +0000
committernicm <nicm>2017-05-12 10:45:38 +0000
commit7d3e2c83d4487c306fc77f22c2cc12f5842bd5ae (patch)
tree4df353e5a9af509af29767935a59ad0538f3fae6 /format.c
parentc0d3f204b0b7557793f89535dd555258b3a4a85f (diff)
downloadrtmux-7d3e2c83d4487c306fc77f22c2cc12f5842bd5ae.tar.gz
rtmux-7d3e2c83d4487c306fc77f22c2cc12f5842bd5ae.tar.bz2
rtmux-7d3e2c83d4487c306fc77f22c2cc12f5842bd5ae.zip
Store copy mode search string in pane so search-again command works even
if you exit and reenter copy mode (it doesn't remember the position, just the search string), suggested by espie@.
Diffstat (limited to 'format.c')
-rw-r--r--format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/format.c b/format.c
index d6bc9ceb..eb61a00a 100644
--- a/format.c
+++ b/format.c
@@ -1376,8 +1376,8 @@ format_defaults_pane(struct format_tree *ft, struct window_pane *wp)
format_add(ft, "pane_synchronized", "%d",
!!options_get_number(wp->window->options, "synchronize-panes"));
- format_add(ft, "pane_search_string", "%s",
- window_copy_search_string(wp));
+ if (wp->searchstr != NULL)
+ format_add(ft, "pane_search_string", "%s", wp->searchstr);
format_add(ft, "pane_tty", "%s", wp->tty);
format_add(ft, "pane_pid", "%ld", (long) wp->pid);