Make sure cwd colors update when the variable changes. This is a common regression, it seems. This time it was caused by the repaint reductions added in 1.22.2.

darcs-hash:20061212101348-ac50b-970686fcd3317f19c6131cdc46885a841c68a6d6.gz
This commit is contained in:
axel 2006-12-12 20:13:48 +10:00
parent edc20a7505
commit 234034d302
4 changed files with 16 additions and 4 deletions

View file

@ -133,7 +133,8 @@ static const wchar_t *name_arr[] =
L"vi-arg-digit", L"vi-arg-digit",
L"execute", L"execute",
L"beginning-of-buffer", L"beginning-of-buffer",
L"end-of-buffer" L"end-of-buffer",
L"repaint"
} }
; ;
@ -214,6 +215,7 @@ static const wchar_t code_arr[] =
R_EXECUTE, R_EXECUTE,
R_BEGINNING_OF_BUFFER, R_BEGINNING_OF_BUFFER,
R_END_OF_BUFFER, R_END_OF_BUFFER,
R_REPAINT
} }
; ;
@ -255,7 +257,6 @@ static int inputrc_error = 0;
*/ */
static int is_init = 0; static int is_init = 0;
/** /**
This is the variable telling us how many timew the next command This is the variable telling us how many timew the next command
should bne repeated. Only actually used in vi-mode. should bne repeated. Only actually used in vi-mode.

View file

@ -48,7 +48,8 @@ enum
R_VI_DELETE_TO, R_VI_DELETE_TO,
R_EXECUTE, R_EXECUTE,
R_BEGINNING_OF_BUFFER, R_BEGINNING_OF_BUFFER,
R_END_OF_BUFFER R_END_OF_BUFFER,
R_REPAINT
} }
; ;

View file

@ -2164,6 +2164,16 @@ wchar_t *reader_readline()
case R_NULL: case R_NULL:
{ {
// exec_prompt(); // exec_prompt();
write( 1, "\r", 1 );
s_reset( &data->screen );
repaint();
break;
}
case R_REPAINT:
{
exec_prompt();
write( 1, "\r", 1 );
s_reset( &data->screen ); s_reset( &data->screen );
repaint(); repaint();
break; break;

View file

@ -166,7 +166,7 @@ functions -e set_default
function __fish_repaint --on-variable fish_color_cwd -d (N_ "Event handler, repaints the prompt when fish_color_cwd changes") function __fish_repaint --on-variable fish_color_cwd -d (N_ "Event handler, repaints the prompt when fish_color_cwd changes")
set -e __fish_prompt_cwd set -e __fish_prompt_cwd
commandline -f null commandline -f repaint
end end
# #