diff options
author | nyamatongwe <devnull@localhost> | 2001-10-25 23:50:45 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2001-10-25 23:50:45 +0000 |
commit | 04da1dfb753b4805a822587f23c258eaa5bc5f5f (patch) | |
tree | def446f644219cf0c3800b38254d11e7e962fd1e /src/Document.h | |
parent | 323e91c0fec19504a823dd5c52737dc34b9be7a1 (diff) | |
download | scintilla-mirror-04da1dfb753b4805a822587f23c258eaa5bc5f5f.tar.gz |
Changed definition of word to either be a sequence of word characters or
a sequence of punctuation. Punctuation is defined as those character that
are not in the set of word characters but are not new line (\r or \n)
characters or space characters. Space characters are ' ' and control
characters.
Word boundaries occur between sequences of these four (word, punctuation,
space and newline) classes although there is some fiddling to ensure
spaces are correctly associated with their adjacent words when performing
some operations such as delete to end of word.
Diffstat (limited to 'src/Document.h')
-rw-r--r-- | src/Document.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Document.h b/src/Document.h index 394c8f94b..d0e63fc5b 100644 --- a/src/Document.h +++ b/src/Document.h @@ -81,7 +81,8 @@ public: private: int refCount; CellBuffer cb; - bool wordchars[256]; + enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; + charClassification charClass[256]; char stylingMask; int endStyled; int enteredCount; @@ -209,7 +210,7 @@ public: private: bool IsDBCS(int pos); - bool IsWordChar(unsigned char ch); + charClassification WordCharClass(unsigned char ch); bool IsWordStartAt(int pos); bool IsWordEndAt(int pos); bool IsWordAt(int start, int end); |