diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index 1120a3c0c..e21898335 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -521,10 +521,11 @@ public: { int firstVisibleLineVis = (int) execute(SCI_GETFIRSTVISIBLELINE); int lastVisibleLineVis = linesVisible + firstVisibleLineVis + 1; + int lastVisibleLineDoc = (int) execute(SCI_DOCLINEFROMVISIBLE, lastVisibleLineVis); int i = 0; - while (lastVisibleLineVis) + while (lastVisibleLineDoc) { - lastVisibleLineVis /= 10; + lastVisibleLineDoc /= 10; ++i; } i = max(i, 3);