Skip to content

Commit

Permalink
Scintilla 4.4.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Sep 17, 2020
1 parent 559d620 commit 5aa9ddf
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 19 deletions.
5 changes: 3 additions & 2 deletions scintilla/src/ContractionState.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,10 @@ bool ContractionState<LINE>::SetHeight(Sci::Line lineDoc, int height) {
return false;
} else if (lineDoc < LinesInDoc()) {
EnsureData();
if (GetHeight(lineDoc) != height) {
const int h = GetHeight(lineDoc);
if (h != height) {
if (GetVisible(lineDoc)) {
displayLines->InsertText(static_cast<LINE>(lineDoc), height - GetHeight(lineDoc));
displayLines->InsertText(static_cast<LINE>(lineDoc), height - h);
}
heights->SetValueAt(static_cast<LINE>(lineDoc), height);
Check();
Expand Down
13 changes: 8 additions & 5 deletions scintilla/src/ElapsedPeriod.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ namespace Scintilla {

// Simplified access to high precision timing.
class ElapsedPeriod {
std::chrono::high_resolution_clock::time_point tp;
#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
using ElapsedClock = std::chrono::steady_clock;
#else
using ElapsedClock = std::chrono::high_resolution_clock;
#endif
ElapsedClock::time_point tp;
public:
/// Capture the moment
ElapsedPeriod() noexcept : tp(std::chrono::high_resolution_clock::now()) {
}
ElapsedPeriod() noexcept : tp(ElapsedClock::now()) {}
/// Return duration as floating point seconds
double Duration(bool reset=false) noexcept {
const std::chrono::high_resolution_clock::time_point tpNow =
std::chrono::high_resolution_clock::now();
const auto tpNow = ElapsedClock::now();
const auto stylingDuration =
std::chrono::duration_cast<std::chrono::duration<double>>(tpNow - tp);
if (reset) {
Expand Down
7 changes: 2 additions & 5 deletions scintilla/src/PositionCache.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,8 @@ void LineLayout::SetLineStart(int line, int start) {
if ((line >= lenLineStarts) && (line != 0)) {
const int newMaxLines = line + 20;
std::unique_ptr<int[]> newLineStarts = std::make_unique<int[]>(newMaxLines);
for (int i = 0; i < newMaxLines; i++) {
if (i < lenLineStarts)
newLineStarts[i] = lineStarts[i];
else
newLineStarts[i] = 0;
for (int i = 0; i < lenLineStarts; i++) {
newLineStarts[i] = lineStarts[i];
}
lineStarts = std::move(newLineStarts);
lenLineStarts = newMaxLines;
Expand Down
4 changes: 2 additions & 2 deletions scintilla/win32/ScintillaWin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ class ScintillaWin :
SetCoalescableTimerSig SetCoalescableTimerFn;
#endif

unsigned int linesPerScroll; ///< Intellimouse support
UINT linesPerScroll; ///< Intellimouse support
int wheelDelta; ///< Wheel delta from roll

UINT dpi;
Expand Down Expand Up @@ -1689,7 +1689,7 @@ sptr_t ScintillaWin::MouseMessage(unsigned int iMessage, uptr_t wParam, sptr_t l
wheelDelta -= GET_WHEEL_DELTA_WPARAM(wParam);
if (std::abs(wheelDelta) >= WHEEL_DELTA && linesPerScroll > 0) {
Sci::Line linesToScroll = linesPerScroll;
if (linesToScroll == WHEEL_PAGESCROLL) {
if (linesPerScroll == WHEEL_PAGESCROLL) {
linesToScroll = LinesOnScreen() - 1;
}
linesToScroll = std::max<Sci::Line>(linesToScroll, 1);
Expand Down
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#define HELP_LINK_FEATURE_REQUEST L"https://github.com/zufuliu/notepad2/issues"
#define HELP_LINK_ONLINE_WIKI L"https://github.com/zufuliu/notepad2/wiki"

#define VERSION_BUILD_INFO_LIB L",\nScintilla 4.4.4."
#define VERSION_BUILD_INFO_LIB L",\nScintilla 4.4.5."
#define VERSION_BUILD_INFO_FORMAT L"Compiled on " __DATE__ L" with %s %d.%d.%d" VERSION_BUILD_INFO_LIB
#if defined(__clang__)
#define VERSION_BUILD_TOOL_NAME L"Clang"
Expand Down
8 changes: 4 additions & 4 deletions version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ git clone https://github.com/XhmikosR/notepad2-mod.git

Scintilla (upstream)
hg clone http://hg.code.sf.net/p/scintilla/code scintilla
4.4.4
2020-08-26 8509:fc1c341a2339
4.4.5
2020-09-11 8521:a4107157801b

SciTE (upstream)
hg clone http://hg.code.sf.net/p/scintilla/scite
4.4.4
2020-08-25 5511:88ab2d10323c
4.4.5
2020-09-11 5521:124b2044d6c6

Notepad3 (3-clause BSD)
https://github.com/rizonesoft/Notepad3
Expand Down

0 comments on commit 5aa9ddf

Please sign in to comment.