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.
This commit is contained in:
nicm
2017-05-03 05:53:34 +00:00
parent 0ccfb61bb0
commit ca6a121e63
5 changed files with 24 additions and 1 deletions

View File

@ -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);
}