(
mycli: 'MyCli',
app: prompt_toolkit.application.application.Application,
)
| 372 | |
| 373 | |
| 374 | def _get_prompt_message( |
| 375 | mycli: 'MyCli', |
| 376 | app: prompt_toolkit.application.application.Application, |
| 377 | ) -> FormattedText: |
| 378 | if app.current_buffer.text: |
| 379 | return mycli.last_prompt_message |
| 380 | |
| 381 | prompt = render_prompt_string(mycli, mycli.prompt_format, app.render_counter) |
| 382 | prompt_plain = to_plain_text(prompt) |
| 383 | if mycli.prompt_format == mycli.default_prompt and len(prompt_plain) > mycli.max_len_prompt: |
| 384 | prompt = render_prompt_string(mycli, mycli.default_prompt_splitln, app.render_counter) |
| 385 | prompt_plain = to_plain_text(prompt) |
| 386 | mycli.prompt_lines = prompt_plain.count('\n') + 1 |
| 387 | if not mycli.prompt_lines: |
| 388 | mycli.prompt_lines = prompt_plain.count('\n') + 1 |
| 389 | |
| 390 | mycli.last_prompt_message = prompt |
| 391 | return mycli.last_prompt_message |
| 392 | |
| 393 | |
| 394 | def _get_continuation( |
nothing calls this directly
no test coverage detected