diff options
author | nyamatongwe <unknown> | 2010-09-25 18:02:59 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-09-25 18:02:59 +1000 |
commit | 10cf4beef4d7293d6d382fe4b3216da48fa87fa1 (patch) | |
tree | 07d01bea7f3d55860a7b45d500a5901f4d5b63d4 /src/CellBuffer.cxx | |
parent | 16b604e76efd53716623978c94069fd6194c7005 (diff) | |
download | scintilla-mirror-10cf4beef4d7293d6d382fe4b3216da48fa87fa1.tar.gz |
Optimization of line layout by minimizing calls in Editor::LayoutLine and avoiding
case force processing unless at least one style uses a case force option.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index de1605837..19f6670f6 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -358,6 +358,19 @@ char CellBuffer::StyleAt(int position) const { return style.ValueAt(position); } +void CellBuffer::GetStyleRange(unsigned char *buffer, int position, int lengthRetrieve) const { + if (lengthRetrieve < 0) + return; + if (position < 0) + return; + if ((position + lengthRetrieve) > style.Length()) { + Platform::DebugPrintf("Bad GetStyleRange %d for %d of %d\n", position, + lengthRetrieve, style.Length()); + return; + } + style.GetRange(reinterpret_cast<char *>(buffer), position, lengthRetrieve); +} + const char *CellBuffer::BufferPointer() { return substance.BufferPointer(); } |