From 9f6d34133a1911efec6994be38b85f2ffcda9934 Mon Sep 17 00:00:00 2001 From: Alexey Date: Wed, 24 Jun 2020 11:54:56 +0300 Subject: [PATCH] fix https://github.com/Alexey-T/CudaText/issues/2692 --- atsynedit/atsynedit.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atsynedit/atsynedit.pas b/atsynedit/atsynedit.pas index efd216623..1d44626e6 100644 --- a/atsynedit/atsynedit.pas +++ b/atsynedit/atsynedit.pas @@ -2205,7 +2205,7 @@ function TATSynEdit.UpdateScrollbars(AdjustSmoothPos: boolean): boolean; with FScrollVert do begin NPage:= Max(1, GetVisibleLines)-1; - NMax:= Max(1, FWrapInfo.Count-1); + NMax:= Max(0, FWrapInfo.Count-1); //must be 0 for single line text if FOptLastLineOnTop then Inc(NMax, NPage); NPosLast:= Max(0, NMax-NPage);