File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ private int GenerateRender(string defaultColor)
158158 var text = ParseInput ( ) ;
159159
160160 string color = defaultColor ;
161- string activeColor = "" ;
161+ string activeColor = string . Empty ;
162162 bool afterLastToken = false ;
163163 int currentLogicalLine = 0 ;
164164 bool inSelectedRegion = false ;
@@ -302,6 +302,13 @@ void MaybeEmphasize(int i, string currColor)
302302 _consoleBufferLines . Add ( new StringBuilder ( COMMON_WIDEST_CONSOLE_WIDTH ) ) ;
303303 }
304304
305+ // Reset the color for continuation prompt so the color sequence will always be explicitly
306+ // specified for continuation prompt in the generated render strings.
307+ // This is necessary because we will likely not rewrite all texts during rendering, and thus
308+ // we cannot assume the continuation prompt can continue to use the active color setting from
309+ // the previous rendering string.
310+ activeColor = string . Empty ;
311+
305312 UpdateColorsIfNecessary ( Options . _continuationPromptColor ) ;
306313 foreach ( char c in Options . ContinuationPrompt )
307314 {
You can’t perform that action at this time.
0 commit comments