aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexPO.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-11-20 11:05:28 +1100
committerNeil <nyamatongwe@gmail.com>2015-11-20 11:05:28 +1100
commit6652c4eadad09cf6ea23b690c92d70b55a49d57f (patch)
tree955441c738e7e43de65414f956b16d678486eb1a /lexers/LexPO.cxx
parentad16ecb14a085d950b6a243b02267a0eca50f5c9 (diff)
downloadscintilla-mirror-6652c4eadad09cf6ea23b690c92d70b55a49d57f.tar.gz
Remove line end whitespace.
Diffstat (limited to 'lexers/LexPO.cxx')
-rw-r--r--lexers/LexPO.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/lexers/LexPO.cxx b/lexers/LexPO.cxx
index 61e601126..fcf886d6c 100644
--- a/lexers/LexPO.cxx
+++ b/lexers/LexPO.cxx
@@ -41,7 +41,7 @@ static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int init
Sci_Position curLine = styler.GetLine(startPos);
// the line state holds the last state on or before the line that isn't the default style
int curLineState = curLine > 0 ? styler.GetLineState(curLine - 1) : SCE_PO_DEFAULT;
-
+
for (; sc.More(); sc.Forward()) {
// whether we should leave a state
switch (sc.state) {
@@ -57,19 +57,19 @@ static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int init
// on its own like a keyword rather than changing the whole flags style
sc.ChangeState(SCE_PO_FUZZY);
break;
-
+
case SCE_PO_MSGCTXT:
case SCE_PO_MSGID:
case SCE_PO_MSGSTR:
if (isspacechar(sc.ch))
sc.SetState(SCE_PO_DEFAULT);
break;
-
+
case SCE_PO_ERROR:
if (sc.atLineEnd)
sc.SetState(SCE_PO_DEFAULT);
break;
-
+
case SCE_PO_MSGCTXT_TEXT:
case SCE_PO_MSGID_TEXT:
case SCE_PO_MSGSTR_TEXT:
@@ -92,7 +92,7 @@ static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int init
}
break;
}
-
+
// whether we should enter a new state
if (sc.state == SCE_PO_DEFAULT) {
// forward to the first non-white character on the line
@@ -103,11 +103,11 @@ static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int init
// and anyway the styling don't use line state for comments
if (curLineState == SCE_PO_COMMENT)
curLineState = SCE_PO_DEFAULT;
-
+
while (sc.More() && ! sc.atLineEnd && isspacechar(sc.ch))
sc.Forward();
}
-
+
if (atLineStart && sc.ch == '#') {
if (sc.chNext == '.')
sc.SetState(SCE_PO_PROGRAMMER_COMMENT);
@@ -134,11 +134,11 @@ static void ColourisePODoc(Sci_PositionU startPos, Sci_Position length, int init
sc.SetState(SCE_PO_ERROR);
} else if (! isspacechar(sc.ch))
sc.SetState(SCE_PO_ERROR);
-
+
if (sc.state != SCE_PO_DEFAULT)
curLineState = sc.state;
}
-
+
if (sc.atLineEnd) {
// Update the line state, so it can be seen by next line
curLine = styler.GetLine(sc.currentPos);
@@ -163,7 +163,7 @@ static void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList
return;
bool foldCompact = styler.GetPropertyInt("fold.compact") != 0;
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
-
+
Sci_PositionU endPos = startPos + length;
Sci_Position curLine = styler.GetLine(startPos);
int lineState = styler.GetLineState(curLine);
@@ -172,17 +172,17 @@ static void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList
int nextLevel;
int visible = 0;
int chNext = styler[startPos];
-
+
for (Sci_PositionU i = startPos; i < endPos; i++) {
int ch = chNext;
chNext = styler.SafeGetCharAt(i+1);
-
+
if (! isspacechar(ch)) {
visible++;
} else if ((ch == '\r' && chNext != '\n') || ch == '\n' || i+1 >= endPos) {
int lvl = level;
Sci_Position nextLine = curLine + 1;
-
+
nextLineState = styler.GetLineState(nextLine);
if ((lineState != SCE_PO_COMMENT || foldComment) &&
nextLineState == lineState &&
@@ -190,14 +190,14 @@ static void FoldPODoc(Sci_PositionU startPos, Sci_Position length, int, WordList
nextLevel = SC_FOLDLEVELBASE + 1;
else
nextLevel = SC_FOLDLEVELBASE;
-
+
if (nextLevel > level)
lvl |= SC_FOLDLEVELHEADERFLAG;
if (visible == 0 && foldCompact)
lvl |= SC_FOLDLEVELWHITEFLAG;
-
+
styler.SetLevel(curLine, lvl);
-
+
lineState = nextLineState;
curLine = nextLine;
level = nextLevel;