diff options
author | nyamatongwe <devnull@localhost> | 2010-02-17 00:39:46 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-02-17 00:39:46 +0000 |
commit | 81966e31f21a009cbae89dd3f774b3a410f201e4 (patch) | |
tree | fddf110012583bb00001b22648b574320f642815 /src/Editor.cxx | |
parent | 827c80b678ba55806c611de6163cafa7dcf03fb8 (diff) | |
download | scintilla-mirror-81966e31f21a009cbae89dd3f774b3a410f201e4.tar.gz |
Formatting whitespace.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index d9ffb3ee0..0b54fa927 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -52,7 +52,7 @@ using namespace Scintilla; return whether this modification represents an operation that may reasonably be deferred (not done now OR [possibly] at all) */ -static bool CanDeferToLastStep(const DocModification& mh) { +static bool CanDeferToLastStep(const DocModification &mh) { if (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) return true; // CAN skip if (!(mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO))) @@ -62,7 +62,7 @@ static bool CanDeferToLastStep(const DocModification& mh) { return false; // PRESUMABLY must do } -static bool CanEliminate(const DocModification& mh) { +static bool CanEliminate(const DocModification &mh) { return (mh.modificationType & (SC_MOD_BEFOREINSERT | SC_MOD_BEFOREDELETE)) != 0; } @@ -71,7 +71,7 @@ static bool CanEliminate(const DocModification& mh) { return whether this modification represents the FINAL step in a [possibly lengthy] multi-step Undo/Redo sequence */ -static bool IsLastStep(const DocModification& mh) { +static bool IsLastStep(const DocModification &mh) { return (mh.modificationType & (SC_PERFORMED_UNDO | SC_PERFORMED_REDO)) != 0 && (mh.modificationType & SC_MULTISTEPUNDOREDO) != 0 @@ -1501,7 +1501,7 @@ static int istrlen(const char *s) { bool ValidStyledText(ViewStyle &vs, size_t styleOffset, const StyledText &st) { if (st.multipleStyles) { - for (size_t iStyle=0;iStyle<st.length; iStyle++) { + for (size_t iStyle=0; iStyle<st.length; iStyle++) { if (!vs.ValidStyle(styleOffset + st.styles[iStyle])) return false; } @@ -2487,7 +2487,7 @@ void Editor::DrawAnnotation(Surface *surface, ViewStyle &vsDraw, int line, int x surface->LineTo(rcSegment.left, rcSegment.bottom); surface->MoveTo(rcSegment.right, rcSegment.top); surface->LineTo(rcSegment.right, rcSegment.bottom); - if (subLine == ll->lines){ + if (subLine == ll->lines) { surface->MoveTo(rcSegment.left, rcSegment.top); surface->LineTo(rcSegment.right, rcSegment.top); } @@ -2846,7 +2846,7 @@ void Editor::DrawLine(Surface *surface, ViewStyle &vsDraw, int line, int lineVis } } } - if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd ) { + if (ll->hsStart != -1 && vsDraw.hotspotUnderline && iDoc >= ll->hsStart && iDoc < ll->hsEnd) { PRectangle rcUL = rcSegment; rcUL.top = rcUL.top + vsDraw.maxAscent + 1; rcUL.bottom = rcUL.top + 1; @@ -3480,7 +3480,7 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) { vsPrint.showCaretLineBackground = false; // Set colours for printing according to users settings - for (size_t sty = 0;sty < vsPrint.stylesSize;sty++) { + for (size_t sty = 0; sty < vsPrint.stylesSize; sty++) { if (printColourMode == SC_PRINT_INVERTLIGHT) { vsPrint.styles[sty].fore.desired = InvertedLight(vsPrint.styles[sty].fore.desired); vsPrint.styles[sty].back.desired = InvertedLight(vsPrint.styles[sty].back.desired); @@ -4020,7 +4020,7 @@ void Editor::NotifyStyleToNeeded(int endStyleNeeded) { NotifyParent(scn); } -void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) { +void Editor::NotifyStyleNeeded(Document *, void *, int endStyleNeeded) { NotifyStyleToNeeded(endStyleNeeded); } @@ -4145,12 +4145,12 @@ void Editor::NotifyZoom() { } // Notifications from document -void Editor::NotifyModifyAttempt(Document*, void *) { +void Editor::NotifyModifyAttempt(Document *, void *) { //Platform::DebugPrintf("** Modify Attempt\n"); NotifyModifyAttempt(); } -void Editor::NotifySavePoint(Document*, void *, bool atSavePoint) { +void Editor::NotifySavePoint(Document *, void *, bool atSavePoint) { //Platform::DebugPrintf("** Save Point %s\n", atSavePoint ? "On" : "Off"); NotifySavePoint(atSavePoint); } @@ -4193,7 +4193,7 @@ static inline int MovePositionForDeletion(int position, int startDeletion, int l } } -void Editor::NotifyModified(Document*, DocModification mh, void *) { +void Editor::NotifyModified(Document *, DocModification mh, void *) { needUpdateUI = true; if (paintState == painting) { CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); @@ -5799,7 +5799,7 @@ void Editor::SetHotSpotRange(Point *pt) { } } -void Editor::GetHotSpotRange(int& hsStart_, int& hsEnd_) { +void Editor::GetHotSpotRange(int &hsStart_, int &hsEnd_) { hsStart_ = hsStart; hsEnd_ = hsEnd; } @@ -6309,11 +6309,11 @@ void Editor::AddStyledText(char *buffer, int appendLength) { size_t textLength = appendLength / 2; char *text = new char[textLength]; size_t i; - for (i = 0;i < textLength;i++) { + for (i = 0; i < textLength; i++) { text[i] = buffer[i*2]; } pdoc->InsertString(CurrentPosition(), text, textLength); - for (i = 0;i < textLength;i++) { + for (i = 0; i < textLength; i++) { text[i] = buffer[i*2+1]; } pdoc->StartStyling(CurrentPosition(), static_cast<char>(0xff)); |