Skip to content

Commit bcce435

Browse files
committed
Fix ugly scrolling introduced with Ctrl-R support
1 parent debc220 commit bcce435

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PSReadLine/ReadLine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,9 +2272,9 @@ private void ReallyRender()
22722272

22732273
PlaceCursor();
22742274

2275-
if ((_initialY + bufferLineCount + 1) > (Console.WindowTop + Console.WindowHeight))
2275+
if ((_initialY + bufferLineCount + (_demoMode ? 1 : 0)) > (Console.WindowTop + Console.WindowHeight))
22762276
{
2277-
Console.WindowTop = _initialY + bufferLineCount + 1 - Console.WindowHeight;
2277+
Console.WindowTop = _initialY + bufferLineCount + (_demoMode ? 1 : 0) - Console.WindowHeight;
22782278
}
22792279

22802280
_lastRenderTime = DateTime.Now;

0 commit comments

Comments
 (0)