diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 10 | ||||
-rw-r--r-- | src/Document.h | 4 | ||||
-rw-r--r-- | src/EditModel.h | 2 | ||||
-rw-r--r-- | src/EditView.cxx | 8 | ||||
-rw-r--r-- | src/Editor.cxx | 10 | ||||
-rw-r--r-- | src/Editor.h | 2 | ||||
-rw-r--r-- | src/Indicator.cxx | 2 |
7 files changed, 19 insertions, 19 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 65c63c138..122ce0f59 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -271,7 +271,7 @@ void Document::TentativeUndo() { bool endSavePoint = cb.IsSavePoint(); if (startSavePoint != endSavePoint) NotifySavePoint(endSavePoint); - + cb.TentativeCommit(); } enteredModification--; @@ -1277,7 +1277,7 @@ int Document::SetLineIndentation(int line, int indent) { int indentPos = GetLineIndentPosition(line); UndoGroup ug(this); DeleteChars(thisLineStart, indentPos - thisLineStart); - return thisLineStart + InsertString(thisLineStart, linebuf.c_str(), + return thisLineStart + InsertString(thisLineStart, linebuf.c_str(), static_cast<int>(linebuf.length())); } else { return GetLineIndentPosition(line); @@ -2554,10 +2554,10 @@ public: return doc != other.doc || position != other.position; } int Pos() const { - return position; + return position; } int PosRoundUp() const { - return position; + return position; } }; @@ -2654,7 +2654,7 @@ long Cxx11RegexFindText(Document *doc, int minPos, int maxPos, const char *s, std::wregex regexp; #if defined(__APPLE__) // Using a UTF-8 locale doesn't change to Unicode over a byte buffer so '.' - // is one byte not one character. + // is one byte not one character. // However, on OS X this makes wregex act as Unicode std::locale localeU("en_US.UTF-8"); regexp.imbue(localeU); diff --git a/src/Document.h b/src/Document.h index 71a45879e..21713d3a2 100644 --- a/src/Document.h +++ b/src/Document.h @@ -376,7 +376,7 @@ public: struct CharacterExtracted { unsigned int character; unsigned int widthBytes; - CharacterExtracted(unsigned int character_, unsigned int widthBytes_) : + CharacterExtracted(unsigned int character_, unsigned int widthBytes_) : character(character_), widthBytes(widthBytes_) { } }; @@ -427,7 +427,7 @@ public: void AnnotationSetStyles(int line, const unsigned char *styles); int AnnotationLines(int line) const; void AnnotationClearAll(); - + bool AddWatcher(DocWatcher *watcher, void *userData); bool RemoveWatcher(DocWatcher *watcher, void *userData); diff --git a/src/EditModel.h b/src/EditModel.h index 33c1ac0df..021bf6770 100644 --- a/src/EditModel.h +++ b/src/EditModel.h @@ -42,7 +42,7 @@ public: Selection sel; bool primarySelection; - enum IMEInteraction { imeWindowed, imeInline } imeInteraction; + enum IMEInteraction { imeWindowed, imeInline } imeInteraction; int foldFlags; ContractionState cs; diff --git a/src/EditView.cxx b/src/EditView.cxx index 04b94a815..692740b7c 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -394,7 +394,7 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co allSame = allSame && (ll->chars[numCharsInLine] == static_cast<char>(toupper(chDoc))); else { // Style::caseCamel - if ((model.pdoc->WordCharClass(ll->chars[numCharsInLine]) == CharClassify::ccWord) && + if ((model.pdoc->WordCharClass(ll->chars[numCharsInLine]) == CharClassify::ccWord) && ((numCharsInLine == 0) || (model.pdoc->WordCharClass(ll->chars[numCharsInLine - 1]) != CharClassify::ccWord))) { allSame = allSame && (ll->chars[numCharsInLine] == static_cast<char>(toupper(chDoc))); } else { @@ -444,13 +444,13 @@ void EditView::LayoutLine(const EditModel &model, int line, Surface *surface, co else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseLower) ll->chars[charInLine] = static_cast<char>(tolower(chDoc)); else if (vstyle.styles[ll->styles[charInLine]].caseForce == Style::caseCamel) { - if ((model.pdoc->WordCharClass(ll->chars[charInLine]) == CharClassify::ccWord) && + if ((model.pdoc->WordCharClass(ll->chars[charInLine]) == CharClassify::ccWord) && ((charInLine == 0) || (model.pdoc->WordCharClass(ll->chars[charInLine - 1]) != CharClassify::ccWord))) { ll->chars[charInLine] = static_cast<char>(toupper(chDoc)); } else { ll->chars[charInLine] = static_cast<char>(tolower(chDoc)); } - } + } } } ll->xHighlightGuide = 0; @@ -1476,7 +1476,7 @@ void EditView::DrawForeground(Surface *surface, const EditModel &model, const Vi if (indicatorValue) { const Indicator &indicator = vsDraw.indicators[deco->indicator]; const bool hover = indicator.IsDynamic() && - ((model.hoverIndicatorPos >= ts.start + posLineStart) && + ((model.hoverIndicatorPos >= ts.start + posLineStart) && (model.hoverIndicatorPos <= ts.end() + posLineStart)); if (hover) { if (indicator.sacHover.style == INDIC_TEXTFORE) { diff --git a/src/Editor.cxx b/src/Editor.cxx index d7cbe11ee..4f53d1e99 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3111,7 +3111,7 @@ void Editor::CursorUpOrDown(int direction, Selection::selTypes selt) { const SelectionPosition spCaretNow = sel.Range(r).caret; const SelectionPosition posNew = MovePositionSoVisible( PositionUpOrDown(spCaretNow, direction, lastX), direction); - sel.Range(r) = selt == Selection::selStream ? + sel.Range(r) = selt == Selection::selStream ? SelectionRange(posNew, sel.Range(r).anchor) : SelectionRange(posNew); } sel.RemoveDuplicates(); @@ -3477,7 +3477,7 @@ int Editor::DelWordOrLine(unsigned int iMessage) { // which means 2 actions so wrap in an undo group. // Rightwards and leftwards deletions differ in treatment of virtual space. - // Clear virtual space for leftwards, realise for rightwards. + // Clear virtual space for leftwards, realise for rightwards. const bool leftwards = (iMessage == SCI_DELWORDLEFT) || (iMessage == SCI_DELLINELEFT); if (!additionalSelectionTyping) { @@ -3496,7 +3496,7 @@ int Editor::DelWordOrLine(unsigned int iMessage) { sel.Range(r) = SelectionRange( InsertSpace(sel.Range(r).caret.Position(), sel.Range(r).caret.VirtualSpace())); } - + Range rangeDelete; switch (iMessage) { case SCI_DELWORDLEFT: @@ -6463,7 +6463,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_ISRANGEWORD: return pdoc->IsWordAt(static_cast<int>(wParam), static_cast<int>(lParam)); - + case SCI_SETIDLESTYLING: idleStyling = static_cast<int>(wParam); break; @@ -6669,7 +6669,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETIMEINTERACTION: return imeInteraction; - + #ifdef INCLUDE_DEPRECATED_FEATURES case SCI_SETUSEPALETTE: InvalidateStyleRedraw(); diff --git a/src/Editor.h b/src/Editor.h index 0d788b5a8..67aad42d7 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -36,7 +36,7 @@ public: /** * When platform has a way to generate an event before painting, - * accumulate needed styling range and other work items in + * accumulate needed styling range and other work items in * WorkNeeded to avoid unnecessary work inside paint handler */ class WorkNeeded { diff --git a/src/Indicator.cxx b/src/Indicator.cxx index 7380d52d2..4bc25a815 100644 --- a/src/Indicator.cxx +++ b/src/Indicator.cxx @@ -128,7 +128,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r rcBox.top = rcLine.top + 1; rcBox.left = rc.left; rcBox.right = rc.right; - surface->AlphaRectangle(rcBox, (sacDraw.style == INDIC_ROUNDBOX) ? 1 : 0, + surface->AlphaRectangle(rcBox, (sacDraw.style == INDIC_ROUNDBOX) ? 1 : 0, sacDraw.fore, fillAlpha, sacDraw.fore, outlineAlpha, 0); } else if (sacDraw.style == INDIC_DOTBOX) { PRectangle rcBox = PixelGridAlign(rc); |