Add repaint-mode bind function

If we switch the bind mode, we add a "force-repaint" there just to
redraw the mode indicator.

That's quite wasteful and annoying, considering that sometimes the prompt can take
half a second.

So we add a "repaint-mode" function that just reexecutes the
mode-prompt and uses the cached values for the others.

Fixes #5783.
This commit is contained in:
Fabian Homborg
2019-04-01 15:52:21 +02:00
parent da1b32f0ad
commit 8ff866b26b
5 changed files with 73 additions and 50 deletions

View File

@@ -112,6 +112,7 @@ static const input_function_metadata_t input_function_metadata[] = {
{readline_cmd_t::execute, L"execute"},
{readline_cmd_t::beginning_of_buffer, L"beginning-of-buffer"},
{readline_cmd_t::end_of_buffer, L"end-of-buffer"},
{readline_cmd_t::repaint_mode, L"repaint-mode"},
{readline_cmd_t::repaint, L"repaint"},
{readline_cmd_t::force_repaint, L"force-repaint"},
{readline_cmd_t::up_line, L"up-line"},