File tree 1 file changed +4
-3
lines changed 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -379,9 +379,10 @@ void UpdateColorsIfNecessary(string newColor)
379
379
// promptBufferCells is the number of visible characters in the prompt
380
380
var promptBufferCells = LengthInBufferCells ( promptText ) ;
381
381
382
- // The 'CursorLeft' could be less than error prompt cell length when
383
- // 1. console buffer was resized and the regular prompt takes a whole line of the new width buffer; OR
384
- // 2. the prompt function was changed and the new prompt is shorter than the error prompt.
382
+ // The 'CursorLeft' could be less than error-prompt-cell-length when
383
+ // 1. console buffer was resized, which causes the initial cursor to appear on the next line;
384
+ // 2. prompt string gets longer (e.g. by 'cd' into nested folders), which causes the line to be wrapped to the next line;
385
+ // 3. the prompt function was changed, which causes the new prompt string is shorter than the error prompt.
385
386
// when this happens, we skip changing the color of the prompt.
386
387
if ( _console . CursorLeft >= promptBufferCells )
387
388
{
You can’t perform that action at this time.
0 commit comments