code: def _get_search_text(self, cli):
          
          # When the search buffer has focus, take that text.
          if self.preview_search(cli) and cli.buffers[self.search_buffer_name].text:
              return cli.buffers[self.search_buffer_name].text
          # Otherwise, take the text of the last active search.
          else:
              return self.get_search_state(cli).text
docs: The text we are searching for.