File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -184,16 +184,25 @@ private bool AcceptLineImpl()
184184 return false ;
185185 }
186186
187+ // If text was pasted, for performance reasons we skip rendering for some time,
188+ // but if input is accepted, we won't have another chance to render.
189+ //
190+ // Also - if there was an emphasis, we want to clear that before accepting
191+ // and that requires rendering.
192+ bool renderNeeded = _emphasisStart >= 0 || _queuedKeys . Count > 0 ;
193+
187194 _renderForDemoNeeded = false ;
195+ _emphasisStart = - 1 ;
196+ _emphasisLength = 0 ;
188197
189198 // Make sure cursor is at the end before writing the line
190199 _current = _buffer . Length ;
191- if ( _queuedKeys . Count > 0 )
200+
201+ if ( renderNeeded )
192202 {
193- // If text was pasted, for performance reasons we skip rendering for some time,
194- // but if input is accepted, we won't have another chance to render.
195203 ReallyRender ( ) ;
196204 }
205+
197206 var coordinates = ConvertOffsetToCoordinates ( _current ) ;
198207 var y = coordinates . Y + 1 ;
199208 PlaceCursor ( 0 , ref y ) ;
You can’t perform that action at this time.
0 commit comments