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()
184
184
return false ;
185
185
}
186
186
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
+
187
194
_renderForDemoNeeded = false ;
195
+ _emphasisStart = - 1 ;
196
+ _emphasisLength = 0 ;
188
197
189
198
// Make sure cursor is at the end before writing the line
190
199
_current = _buffer . Length ;
191
- if ( _queuedKeys . Count > 0 )
200
+
201
+ if ( renderNeeded )
192
202
{
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.
195
203
ReallyRender ( ) ;
196
204
}
205
+
197
206
var coordinates = ConvertOffsetToCoordinates ( _current ) ;
198
207
var y = coordinates . Y + 1 ;
199
208
PlaceCursor ( 0 , ref y ) ;
You can’t perform that action at this time.
0 commit comments