aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-09-25 18:02:59 +1000
committernyamatongwe <devnull@localhost>2010-09-25 18:02:59 +1000
commit37d3d30561e4bb5740aac4977a8191a7bb29959a (patch)
treea2bfaf25a52ce4c3061f4eb1c409ef8cb57df6ef /src/CellBuffer.cxx
parent18dd7b2eaa6d7228328a6a5dbac3306305841ad6 (diff)
downloadscintilla-mirror-37d3d30561e4bb5740aac4977a8191a7bb29959a.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.cxx13
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();
}