summaryrefslogtreecommitdiffstats
path: root/scintilla/lexers/LexMarkdown.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/lexers/LexMarkdown.cxx')
-rw-r--r--scintilla/lexers/LexMarkdown.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/scintilla/lexers/LexMarkdown.cxx b/scintilla/lexers/LexMarkdown.cxx
index 23a2e60..6729ca5 100644
--- a/scintilla/lexers/LexMarkdown.cxx
+++ b/scintilla/lexers/LexMarkdown.cxx
@@ -60,8 +60,8 @@ static inline bool IsNewline(const int ch) {
}
// True if can follow ch down to the end with possibly trailing whitespace
-static bool FollowToLineEnd(const int ch, const int state, const unsigned int endPos, StyleContext &sc) {
- unsigned int i = 0;
+static bool FollowToLineEnd(const int ch, const int state, const Sci_PositionU endPos, StyleContext &sc) {
+ Sci_PositionU i = 0;
while (sc.GetRelative(++i) == ch)
;
// Skip over whitespace
@@ -78,7 +78,7 @@ static bool FollowToLineEnd(const int ch, const int state, const unsigned int en
// Set the state on text section from current to length characters,
// then set the rest until the newline to default, except for any characters matching token
-static void SetStateAndZoom(const int state, const int length, const int token, StyleContext &sc) {
+static void SetStateAndZoom(const int state, const Sci_Position length, const int token, StyleContext &sc) {
sc.SetState(state);
sc.Forward(length);
sc.SetState(SCE_MARKDOWN_DEFAULT);
@@ -100,11 +100,11 @@ static void SetStateAndZoom(const int state, const int length, const int token,
// Does the previous line have more than spaces and tabs?
static bool HasPrevLineContent(StyleContext &sc) {
- int i = 0;
+ Sci_Position i = 0;
// Go back to the previous newline
- while ((--i + (int)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i)))
+ while ((--i + (Sci_Position)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i)))
;
- while ((--i + (int)sc.currentPos) >= 0) {
+ while ((--i + (Sci_Position)sc.currentPos) >= 0) {
if (IsNewline(sc.GetRelative(i)))
break;
if (!IsASpaceOrTab(sc.GetRelative(i)))
@@ -117,9 +117,9 @@ static bool AtTermStart(StyleContext &sc) {
return sc.currentPos == 0 || isspacechar(sc.chPrev);
}
-static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
+static bool IsValidHrule(const Sci_PositionU endPos, StyleContext &sc) {
int count = 1;
- unsigned int i = 0;
+ Sci_PositionU i = 0;
for (;;) {
++i;
int c = sc.GetRelative(i);
@@ -143,9 +143,9 @@ static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
}
}
-static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle,
+static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,
WordList **, Accessor &styler) {
- unsigned int endPos = startPos + length;
+ Sci_PositionU endPos = startPos + length;
int precharCount = 0;
// Don't advance on a new loop iteration and retry at the same position.
// Useful in the corner case of having to start at the beginning file position
@@ -225,7 +225,7 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
}
else if (sc.state == SCE_MARKDOWN_CODEBK) {
if (sc.atLineStart && sc.Match("~~~")) {
- int i = 1;
+ Sci_Position i = 1;
while (!IsNewline(sc.GetRelative(i)) && sc.currentPos + i < endPos)
i++;
sc.Forward(i);
@@ -347,8 +347,8 @@ static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle
}
// Links and Images
if (sc.Match("![") || sc.ch == '[') {
- int i = 0, j = 0, k = 0;
- int len = endPos - sc.currentPos;
+ Sci_Position i = 0, j = 0, k = 0;
+ Sci_Position len = endPos - sc.currentPos;
while (i < len && (sc.GetRelative(++i) != ']' || sc.GetRelative(i - 1) == '\\'))
;
if (sc.GetRelative(i) == ']') {