diff options
author | nicm <nicm> | 2017-05-03 05:53:34 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-05-03 05:53:34 +0000 |
commit | ca6a121e63c61eb45a81dc7318ed290b8dca45e6 (patch) | |
tree | 90de542bf8acb9d98d32b4f9b1d172c1fc264739 /window-copy.c | |
parent | 0ccfb61bb0e0beb5fe76b64e30637de7d9f696c7 (diff) | |
download | rtmux-ca6a121e63c61eb45a81dc7318ed290b8dca45e6.tar.gz rtmux-ca6a121e63c61eb45a81dc7318ed290b8dca45e6.tar.bz2 rtmux-ca6a121e63c61eb45a81dc7318ed290b8dca45e6.zip |
Add a format for the last search string in copy mode and fix the prompt
so it can work when in -I, suggested by Suraj N Kurapati.
Diffstat (limited to 'window-copy.c')
-rw-r--r-- | window-copy.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/window-copy.c b/window-copy.c index 0896479a..7def63db 100644 --- a/window-copy.c +++ b/window-copy.c @@ -2480,3 +2480,16 @@ window_copy_drag_update(__unused struct client *c, struct mouse_event *m) if (window_copy_update_selection(wp, 1)) window_copy_redraw_selection(wp, old_cy); } + +const char * +window_copy_search_string(struct window_pane *wp) +{ + struct window_copy_mode_data *data; + + if (wp->mode != &window_copy_mode) + return (""); + data = wp->modedata; + if (data->searchtype == WINDOW_COPY_OFF || data->searchstr == NULL) + return (""); + return (data->searchstr); +} |