We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cc0fed commit d37f49aCopy full SHA for d37f49a
1 file changed
src/windows/EditorWindow.cpp
@@ -810,7 +810,14 @@ EditorWindow::WindowActivated(bool active)
810
// cannot calculate scroll position correctly.
811
// After the window is activated for the first time, we are sure
812
// layouting has been completed.
813
- fEditor->SendMessage(SCI_SCROLLCARET, 0, 0);
+ fEditor->SendMessage(SCI_SCROLLCARET);
814
+ // We can safely assume that caret is at the bottom at this point,
815
+ // so scroll further down.
816
+ int linesOnScreen = fEditor->SendMessage(SCI_LINESONSCREEN);
817
+ fEditor->SendMessage(SCI_LINESCROLL, 0, linesOnScreen - 8);
818
+ // ...if that assumption is not correct, make sure the caret
819
+ // is in the view.
820
821
fActivatedGuard = true;
822
}
823
BMessage message(ACTIVE_WINDOW_CHANGED);
0 commit comments