diff options
| author | Neil Hodgson <nyamatongwe@gmail.com> | 2015-02-19 19:17:44 +1100 |
|---|---|---|
| committer | Neil Hodgson <nyamatongwe@gmail.com> | 2015-02-19 19:17:44 +1100 |
| commit | 832cf15cbbcf7a0db8f04009366742ef0fadf99c (patch) | |
| tree | 5959f7e48a75633828868766cd38c1d6228d33be /src/Document.h | |
| parent | d49e4ea87247de6431d4c052fe3c46cd8b3fc855 (diff) | |
| download | scintilla-mirror-832cf15cbbcf7a0db8f04009366742ef0fadf99c.tar.gz | |
Add methods for converting between byte positions and UTF-16 code point positions.
This is needed on Cocoa where the IME wants to be able to index into the document
with UTF-16 counts to match Cocoa's own use of UTF-16.
Diffstat (limited to 'src/Document.h')
| -rw-r--r-- | src/Document.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Document.h b/src/Document.h index e808bb37f..5e66dc2b6 100644 --- a/src/Document.h +++ b/src/Document.h @@ -279,6 +279,7 @@ public: int NextPosition(int pos, int moveDir) const; bool NextCharacter(int &pos, int moveDir) const; // Returns true if pos changed int SCI_METHOD GetRelativePosition(int positionStart, int characterOffset) const; + int GetRelativePositionUTF16(int positionStart, int characterOffset) const; int SCI_METHOD GetCharacterAndWidth(int position, int *pWidth) const; int SCI_METHOD CodePage() const; bool SCI_METHOD IsDBCSLeadByte(char ch) const; @@ -322,6 +323,7 @@ public: int GetLineIndentPosition(int line) const; int GetColumn(int position); int CountCharacters(int startPos, int endPos) const; + int CountUTF16(int startPos, int endPos) const; int FindColumn(int line, int column); void Indent(bool forwards, int lineBottom, int lineTop); static std::string TransformLineEnds(const char *s, size_t len, int eolModeWanted); |
