diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-04-17 08:23:18 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-04-17 08:23:18 +1000 | 
| commit | 255d2d33abf4c2c5a918bacde049004e52b7986f (patch) | |
| tree | 4a563a7d7a9594be0e67b6be6c2c493d8ffea9ec /src/Document.cxx | |
| parent | ec79c307ff36cdcce0e520e67bef69e64a3e19b5 (diff) | |
| download | scintilla-mirror-255d2d33abf4c2c5a918bacde049004e52b7986f.tar.gz | |
Add SC_DOCUMENTOPTION_TEXT_LARGE option for documents larger than 2 GigaBytes.
This option is provisional and experimental.
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index 09a91d469..4765248d1 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -82,7 +82,7 @@ int LexInterface::LineEndTypesSupported() {  }  Document::Document(int options) : -	cb((options & SC_DOCUMENTOPTION_STYLES_NONE) == 0) { +	cb((options & SC_DOCUMENTOPTION_STYLES_NONE) == 0, (options & SC_DOCUMENTOPTION_TEXT_LARGE) != 0) {  	refCount = 0;  #ifdef _WIN32  	eolMode = SC_EOL_CRLF; @@ -113,7 +113,7 @@ Document::Document(int options) :  	perLineData[ldMargin] = std::make_unique<LineAnnotation>();  	perLineData[ldAnnotation] = std::make_unique<LineAnnotation>(); -	decorations = DecorationListCreate(false); +	decorations = DecorationListCreate(IsLarge());  	cb.SetPerLine(this);  } @@ -1520,6 +1520,11 @@ void Document::ConvertLineEnds(int eolModeSet) {  } +int Document::Options() const { +	return (IsLarge() ? SC_DOCUMENTOPTION_TEXT_LARGE : 0) | +		(cb.HasStyles() ? 0 : SC_DOCUMENTOPTION_STYLES_NONE); +} +  bool Document::IsWhiteLine(Sci::Line line) const {  	Sci::Position currentChar = static_cast<Sci::Position>(LineStart(line));  	const Sci::Position endLine = static_cast<Sci::Position>(LineEnd(line)); | 
