aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/LexCPP.cxx2
-rw-r--r--src/LexHTML.cxx2
-rw-r--r--src/LexPerl.cxx2
-rw-r--r--src/LexPython.cxx12
-rw-r--r--src/LexSQL.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index a1edec806..3c02111be 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -57,7 +57,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
int visChars = 0;
styler.StartSegment(startPos);
bool lastWordWasUUID = false;
- for (unsigned int i = startPos; i <= lengthDoc; i++) {
+ for (unsigned int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index e7431e322..653aa4653 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -261,7 +261,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
char chPrev2 = ' ';
styler.StartSegment(startPos);
int lengthDoc = startPos + length;
- for (int i = startPos; i <= lengthDoc; i++) {
+ for (int i = startPos; i < lengthDoc; i++) {
char ch = styler[i];
char chNext = styler.SafeGetCharAt(i + 1);
char chNext2 = styler.SafeGetCharAt(i + 2);
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index c57934866..2ed36e192 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -110,7 +110,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
char chPrev = ' ';
char chNext = styler[startPos];
styler.StartSegment(startPos);
- for (int i = startPos; i <= lengthDoc; i++) {
+ for (int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
char chNext2 = styler.SafeGetCharAt(i + 2);
diff --git a/src/LexPython.cxx b/src/LexPython.cxx
index 84444bdff..f309036a7 100644
--- a/src/LexPython.cxx
+++ b/src/LexPython.cxx
@@ -44,8 +44,8 @@ static bool IsPyComment(Accessor &styler, int pos, int len) {
static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
- int endDoc = startPos + length;
-
+ int lengthDoc = startPos + length;
+
// Backtrack to previous line in case need to fix its fold status or tab whinging
int lineCurrent = styler.GetLine(startPos);
if (startPos > 0) {
@@ -79,7 +79,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
char chNext = styler[startPos];
styler.StartSegment(startPos);
bool atStartLine = true;
- for (int i = startPos; i <= endDoc; i++) {
+ for (int i = startPos; i < lengthDoc; i++) {
if (atStartLine) {
char chBad = static_cast<char>(64);
@@ -102,7 +102,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
chNext = styler.SafeGetCharAt(i + 1);
char chNext2 = styler.SafeGetCharAt(i + 2);
- if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == endDoc)) {
+ if ((ch == '\r' && chNext != '\n') || (ch == '\n') || (i == lengthDoc)) {
if ((state == SCE_P_DEFAULT) || (state == SCE_P_TRIPLE) || (state == SCE_P_TRIPLEDOUBLE)) {
// Perform colourisation of white space and triple quoted strings at end of each line to allow
// tab marking to work inside white space and triple quoted strings
@@ -261,9 +261,9 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
chPrev = ch;
}
if (state == SCE_P_WORD) {
- ClassifyWordPy(styler.GetStartSegment(), endDoc, keywords, styler, prevWord);
+ ClassifyWordPy(styler.GetStartSegment(), lengthDoc, keywords, styler, prevWord);
} else {
- styler.ColourTo(endDoc, state);
+ styler.ColourTo(lengthDoc, state);
}
}
diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx
index 83a22687e..facd0e6b7 100644
--- a/src/LexSQL.cxx
+++ b/src/LexSQL.cxx
@@ -50,7 +50,7 @@ static void ColouriseSQLDoc(unsigned int startPos, int length,
char chNext = styler[startPos];
styler.StartSegment(startPos);
unsigned int lengthDoc = startPos + length;
- for (unsigned int i = startPos; i <= lengthDoc; i++) {
+ for (unsigned int i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);