Some more progress in this area. A patch which uses Sci::Position/Sci::Line/int more accurately and consistently was committed as: https://sourceforge.net/p/scintilla/code/ci/f2650eaa75e690489aeb80546a852469ea84a98d/ This reduced the size of the patch set. The ContractionState class, which is responsible for much of folding and line wrapping, was changed to allow a choice between 32-bit and 64-bit line numbers and this has been added onto the patch set. The choice follows the document size choice but, because there are normally far fewer lines than character, a future possibility could allow 32-bit line numbers and 64-bit text positions. The DecorationList and Decoration classes responsible for indicators were changed similarly to allow 32-bit and 64-bit positions and base this on the ‘IsLarge’ status of Document. The patch set now contains 6 patches which are attached to this mail and which should be applied in numerical order. Neil