diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-10-15 09:05:52 +1100 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-10-15 09:05:52 +1100 |
| commit | 9be9a1b22f7bc4126966677f6c9489dbeeccddd5 (patch) | |
| tree | 2d6b230048be58dd3e92e62a0bfdf67f59d1943a /src/Editor.cxx | |
| parent | e462c018b9dda9e111a07d298bae8fcebb14c8b2 (diff) | |
| download | scintilla-mirror-9be9a1b22f7bc4126966677f6c9489dbeeccddd5.tar.gz | |
Backport: Extract duration measurement damping and clamping into ActionDuration class so
that it can be reused.
Backport of changeset 7113:9b7421470bf8.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 607b541ed..68a090a28 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5052,7 +5052,7 @@ Sci::Position Editor::PositionAfterMaxStyling(Sci::Position posMax, bool scrolli // When scrolling, allow less time to ensure responsive const double secondsAllowed = scrolling ? 0.005 : 0.02; - const Sci::Line linesToStyle = Sci::clamp(static_cast<int>(secondsAllowed / pdoc->durationStyleOneLine), + const Sci::Line linesToStyle = Sci::clamp(static_cast<int>(secondsAllowed / pdoc->durationStyleOneLine.Duration()), 10, 0x10000); const Sci::Line stylingMaxLine = std::min( pdoc->SciLineFromPosition(pdoc->GetEndStyled()) + linesToStyle, |
