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 | e21a8ca7ecf4001bb3c9a6bcc9d415e60ba2b303 (patch) | |
tree | 5ecf5adf895965fe2652e4d01eb2a95e0781de14 /src/Editor.cxx | |
parent | c804e5578b41b3523e5cb933fd40d08ba132b347 (diff) | |
download | scintilla-mirror-e21a8ca7ecf4001bb3c9a6bcc9d415e60ba2b303.tar.gz |
Extract duration measurement damping and clamping into ActionDuration class so
that it can be reused.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 83cb6fec6..c07c0e4a9 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5055,7 +5055,8 @@ 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 = std::clamp(static_cast<int>(secondsAllowed / pdoc->durationStyleOneLine), + const Sci::Line linesToStyle = std::clamp( + static_cast<int>(secondsAllowed / pdoc->durationStyleOneLine.Duration()), 10, 0x10000); const Sci::Line stylingMaxLine = std::min( pdoc->SciLineFromPosition(pdoc->GetEndStyled()) + linesToStyle, |