diff options
author | nyamatongwe <devnull@localhost> | 2013-01-19 11:10:41 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-01-19 11:10:41 +1100 |
commit | 5a13b76c4ba92e4e47cac86d8d7d2617c60aa856 (patch) | |
tree | 04e29696c41c6d512d32190e31606f8cd6480036 /src/Document.cxx | |
parent | 6bddf57deb97b522c7b8e0293fcd15c95a2d9823 (diff) | |
download | scintilla-mirror-5a13b76c4ba92e4e47cac86d8d7d2617c60aa856.tar.gz |
Implement APIs for Unicode line ends and substyles and expose to
message interface.
Expose IDocumentWithLineEnd interface on Document.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 1938149e7..500259d8d 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -67,6 +67,17 @@ void LexInterface::Colourise(int start, int end) { } } +int LexInterface::LineEndTypesSupported() { + if (instance) { + int interfaceVersion = instance->Version(); + if (interfaceVersion >= lvSubStyles) { + ILexerWithSubStyles *ssinstance = static_cast<ILexerWithSubStyles *>(instance); + return ssinstance->LineEndTypesSupported(); + } + } + return 0; +} + Document::Document() { refCount = 0; pcf = NULL; @@ -135,6 +146,13 @@ void Document::Init() { } } +int Document::LineEndTypesSupported() const { + if ((SC_CP_UTF8 == dbcsCodePage) && pli) + return pli->LineEndTypesSupported(); + else + return 0; +} + bool Document::SetDBCSCodePage(int dbcsCodePage_) { if (dbcsCodePage != dbcsCodePage_) { dbcsCodePage = dbcsCodePage_; @@ -245,7 +263,7 @@ int SCI_METHOD Document::LineStart(int line) const { return cb.LineStart(line); } -int Document::LineEnd(int line) const { +int SCI_METHOD Document::LineEnd(int line) const { if (line == LinesTotal() - 1) { return LineStart(line + 1); } else { |