(
mycli: 'MyCli',
toolbar_format: str,
)
| 247 | |
| 248 | |
| 249 | def get_custom_toolbar( |
| 250 | mycli: 'MyCli', |
| 251 | toolbar_format: str, |
| 252 | ) -> FormattedText: |
| 253 | if not mycli.prompt_session: |
| 254 | return to_formatted_text('') |
| 255 | if not mycli.prompt_session.app: |
| 256 | return to_formatted_text('') |
| 257 | if mycli.prompt_session.app.current_buffer.text: |
| 258 | return mycli.last_custom_toolbar_message |
| 259 | mycli.last_custom_toolbar_message = render_prompt_string( |
| 260 | mycli, |
| 261 | toolbar_format, |
| 262 | mycli.prompt_session.app.render_counter, |
| 263 | ) |
| 264 | return mycli.last_custom_toolbar_message |
| 265 | |
| 266 | |
| 267 | def maybe_html_escape(string: str, is_html: bool) -> str: |
no test coverage detected