This PR adds support for showing the current prefix_num and search progress (specifically, search_mark / search_idx.len(). The picture below shows what it looks like if you have 20 typed and your current search has 20 matches and the search mark is currently on the first one (the message on the left is the current prompt).
To do this, a few changes are made:
an extra variable was added to PagerState, called displayed_prompt, which contains the prompt as it will be printed next time it is printed. It is formatted by PagerState::format_prompt() every time that the prefix_num changes, the search_mark changes, or PagerState::format_lines() is called.
PagerState::prompt and PagerState::message are now stored as a string, not a vector of strings, and are no longer wrapped at all.
This PR adds support for showing the current
prefix_num
and search progress (specifically,search_mark / search_idx.len()
. The picture below shows what it looks like if you have20
typed and your current search has 20 matches and the search mark is currently on the first one (the message on the left is the current prompt).To do this, a few changes are made:
PagerState
, calleddisplayed_prompt
, which contains the prompt as it will be printed next time it is printed. It is formatted byPagerState::format_prompt()
every time that theprefix_num
changes, thesearch_mark
changes, orPagerState::format_lines()
is called.PagerState::prompt
andPagerState::message
are now stored as a string, not a vector of strings, and are no longer wrapped at all.rewrap()
was removed, since it is no longer used.