mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Ensure we repaint the prompt after resetting it, when colors change.
Fixes https://github.com/fish-shell/fish-shell/issues/418
This commit is contained in:
parent
43d2e15bb7
commit
224de547b3
1 changed files with 9 additions and 2 deletions
11
reader.cpp
11
reader.cpp
|
@ -758,13 +758,19 @@ void reader_repaint_needed()
|
|||
|
||||
void reader_repaint_if_needed()
|
||||
{
|
||||
if (data && data->screen_reset_needed)
|
||||
if (data == NULL)
|
||||
return;
|
||||
|
||||
bool needs_reset = data->screen_reset_needed;
|
||||
bool needs_repaint = needs_reset || data->repaint_needed;
|
||||
|
||||
if (needs_reset)
|
||||
{
|
||||
s_reset(&data->screen, screen_reset_current_line_and_prompt);
|
||||
data->screen_reset_needed = false;
|
||||
}
|
||||
|
||||
if (data && data->repaint_needed)
|
||||
if (needs_repaint)
|
||||
{
|
||||
reader_repaint();
|
||||
/* reader_repaint clears repaint_needed */
|
||||
|
@ -2848,6 +2854,7 @@ const wchar_t *reader_readline()
|
|||
coalescing_repaints = true;
|
||||
exec_prompt();
|
||||
s_reset(&data->screen, screen_reset_current_line_and_prompt);
|
||||
data->screen_reset_needed = false;
|
||||
reader_repaint();
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue