From 332a113c30cfb6a21de5fb1920e142197ca52fe5 Mon Sep 17 00:00:00 2001 From: zufuliu Date: Wed, 22 Nov 2023 17:44:24 +0800 Subject: [PATCH] Fix typo. --- scintilla/src/CallTip.cxx | 3 ++- scintilla/src/ChangeHistory.cxx | 2 +- scintilla/src/EditView.cxx | 3 +-- scintilla/src/RESearch.cxx | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scintilla/src/CallTip.cxx b/scintilla/src/CallTip.cxx index 99b7adeae6..e0942313cc 100644 --- a/scintilla/src/CallTip.cxx +++ b/scintilla/src/CallTip.cxx @@ -231,7 +231,8 @@ int CallTip::PaintContents(Surface *surfaceWindow, bool draw) { chunkHighlight.start -= lineStart; chunkHighlight.end -= lineStart; - rcClient.top = static_cast(ytext - ascent - 1); + const int top = ytext - ascent - 1; + rcClient.top = top; int x = offsetText; // start each line at this inset diff --git a/scintilla/src/ChangeHistory.cxx b/scintilla/src/ChangeHistory.cxx index bc029c2ce2..829d75a584 100644 --- a/scintilla/src/ChangeHistory.cxx +++ b/scintilla/src/ChangeHistory.cxx @@ -43,7 +43,7 @@ constexpr bool InsertionSpanSameDeletion(const ChangeSpan &is, Sci::Position pos is.start == positionDeletion && is.length == 0 && is.edition == edition; -}; +} } diff --git a/scintilla/src/EditView.cxx b/scintilla/src/EditView.cxx index c953964e24..f7935a9441 100644 --- a/scintilla/src/EditView.cxx +++ b/scintilla/src/EditView.cxx @@ -2268,8 +2268,7 @@ void DrawFoldLines(Surface *surface, const EditModel &model, const ViewStyle &vs const ColourRGBA foldLineColour = vsDraw.ElementColour(Element::FoldLine).value_or( vsDraw.markers[static_cast(MarkerOutline::Folder)].fore); // Paint the line above the fold - // Paint the line above the fold - if ((subLine == 0) && FlagSet(model.foldFlags, (expanded ? FoldFlag::LineBeforeContracted : FoldFlag::LineBeforeExpanded))) { + if ((subLine == 0) && FlagSet(model.foldFlags, (expanded ? FoldFlag::LineBeforeExpanded : FoldFlag::LineBeforeContracted))) { surface->FillRectangleAligned(Side(rcLine, Edge::top, 1.0), foldLineColour); } // Paint the line below the fold diff --git a/scintilla/src/RESearch.cxx b/scintilla/src/RESearch.cxx index 74656b09e2..d8cdf5dbee 100644 --- a/scintilla/src/RESearch.cxx +++ b/scintilla/src/RESearch.cxx @@ -479,7 +479,7 @@ const char *RESearch::DoCompile(const char *pattern, size_t length, FindOption f case '[': { /* match char class */ int prevChar = 0; - bool negative = false; /* xor mask -CCL/NCL */ + bool negative = false;/* xor mask -CCL/NCL */ i++; ++p; @@ -907,7 +907,7 @@ Sci::Position RESearch::PMatch(const CharacterIndexer &ci, Sci::Position lp, Sci break; case REF: { const int n = static_cast(*ap++); - Sci::Position bp = bopat[n]; /* beginning of subpat... */ + Sci::Position bp = bopat[n]; /* beginning of subpat... */ const Sci::Position ep = eopat[n]; /* ending of subpat... */ while (bp < ep) { if (ci.CharAt(bp++) != ci.CharAt(lp++)) @@ -954,7 +954,7 @@ Sci::Position RESearch::PMatch(const CharacterIndexer &ci, Sci::Position lp, Sci } ap += n; - Sci::Position llp = lp; /* lazy lp for LCLO */ + Sci::Position llp = lp; /* lazy lp for LCLO */ Sci::Position e = NOTFOUND; /* extra pointer for CLO */ while (llp >= are) { const Sci::Position q = PMatch(ci, llp, endp, ap);