aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/ILexer.h1
-rw-r--r--src/Document.cxx8
-rw-r--r--src/Document.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/include/ILexer.h b/include/ILexer.h
index ebd1a8843..b119ff649 100644
--- a/include/ILexer.h
+++ b/include/ILexer.h
@@ -42,6 +42,7 @@ public:
virtual int SCI_METHOD CodePage() const = 0;
virtual bool SCI_METHOD IsDBCSLeadByte(char ch) const = 0;
virtual const char * SCI_METHOD BufferPointer() = 0;
+ virtual int SCI_METHOD GetLineIndentation(int line) = 0;
};
enum { lvOriginal=0 };
diff --git a/src/Document.cxx b/src/Document.cxx
index 94b557499..82264021c 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -514,7 +514,7 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) {
return pos;
}
-// NextPosition moves between valid positions - it can not handle a position in the middle of a
+// NextPosition moves between valid positions - it can not handle a position in the middle of a
// multi-byte character. It is used to iterate through text more efficiently than MovePositionOutsideChar.
int Document::NextPosition(int pos, int moveDir) {
// If out of range, just return minimum/maximum value.
@@ -573,7 +573,7 @@ int Document::NextPosition(int pos, int moveDir) {
// Now posTemp+1 must point to the beginning of a character,
// so figure out whether we went back an even or an odd
// number of bytes and go back 1 or 2 bytes, respectively.
- return (pos - 1 - ((pos - posTemp) & 1));
+ return (pos - 1 - ((pos - posTemp) & 1));
}
}
}
@@ -900,7 +900,7 @@ static void CreateIndentation(char *linebuf, int length, int indent, int tabSize
*linebuf = '\0';
}
-int Document::GetLineIndentation(int line) {
+int SCI_METHOD Document::GetLineIndentation(int line) {
int indent = 0;
if ((line >= 0) && (line < LinesTotal())) {
int lineStart = LineStart(line);
@@ -1393,7 +1393,7 @@ long Document::FindText(int minPos, int maxPos, const char *search,
char bytes[maxBytesCharacter + 1];
bytes[0] = cb.CharAt(pos + indexDocument);
const int widthChar = IsDBCSLeadByte(bytes[0]) ? 2 : 1;
- if (widthChar == 2)
+ if (widthChar == 2)
bytes[1] = cb.CharAt(pos + indexDocument + 1);
char folded[maxBytesCharacter * maxFoldingExpansion + 1];
const int lenFlat = pcf->Fold(folded, sizeof(folded), bytes, widthChar);
diff --git a/src/Document.h b/src/Document.h
index 660ec7854..c7ff8e069 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -256,7 +256,7 @@ public:
bool IsSavePoint() { return cb.IsSavePoint(); }
const char * SCI_METHOD BufferPointer() { return cb.BufferPointer(); }
- int GetLineIndentation(int line);
+ int SCI_METHOD GetLineIndentation(int line);
void SetLineIndentation(int line, int indent);
int GetLineIndentPosition(int line) const;
int GetColumn(int position);