diff options
author | nyamatongwe <unknown> | 2013-01-19 11:10:41 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-01-19 11:10:41 +1100 |
commit | 7d3a087d2e149d95e1e267fd6191dd0312fe3c0a (patch) | |
tree | 43ca4e0efe203238a7f1eec810789d91a7fdf6f7 /src/Document.cxx | |
parent | 0bb8702e061f17864f74785e330a40b6feef85ba (diff) | |
download | scintilla-mirror-7d3a087d2e149d95e1e267fd6191dd0312fe3c0a.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 { |