diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2023-06-24 23:22:16 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2023-11-14 10:20:08 +0100 |
| commit | cac2a32ba2da369bdd14e1c864043ae5d19f554d (patch) | |
| tree | 65aa47d64006094c1b446c3684c723fa064d4f66 /src/shell_manager.cc | |
| parent | 70e96c272e3a24e06ee6fc4e3dcd598ae716ae42 (diff) | |
Fix completion pager not rendering after <a-semicolon> in prompt
Usually, the prompt resets "m_line_changed" after invoking the
change handler:
if (m_line_changed)
{
m_callback(m_line_editor.line(), PromptEvent::Change, context());
m_line_changed = false;
}
but with
prompt '' '' -on-change %{ execute-keys <a-semicolon>vl } -shell-script-candidates %{ seq 100 }
the change handler pushes a normal mode with "<a-semicolon>" and then
hands back control to the event loop. Later when the normal mode is
popped we run "Prompt::on_enabled()" but don't actually redraw the
completion pager.
Since the <a-semicolon> excursion by definition did not change our
prompt state, we don't need to recompute completions, only render them.
Do that.
This helps commands that use preview the selected completion via a
"prompt -on-change" handler.
Diffstat (limited to 'src/shell_manager.cc')
0 files changed, 0 insertions, 0 deletions
