From 00c771cecda620db28cec9e4c50830f542e3a829 Mon Sep 17 00:00:00 2001
From: nyamatongwe On Windows, the message-passing scheme used to communicate between the container and
@@ -4815,8 +4817,13 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
pass in the direct pointer associated with the target window. SCI_GETCHARACTERPOINTER
+
+
- Move the gap within Scintilla so that the text of the document is stored consecutively
- and ensure there is a NUL character after the text, then return a pointer to the first character.
+ SCI_GETRANGEPOINTER(int position, int rangeLength)
+ SCI_GETGAPPOSITION
+ Grant temporary direct read-only access to the memory used by Scintilla to store
+ the document.SCI_GETCHARACTERPOINTER moves the gap within Scintilla so that the
+ text of the document is stored consecutively
+ and ensure there is a NUL character after the text, then returns a pointer to the first character.
Applications may then pass this to a function that accepts a character pointer such as a regular
expression search or a parser. The pointer should not be written to as that may desynchronize
the internal state of Scintilla.
SCI_GETRANGEPOINTER provides direct access to just the
+ range requested. The gap is not moved unless it is within the requested range so this call
+ can be faster than SCI_GETCHARACTERPOINTER.
+ This can be used by application code that is able to act on blocks of text or ranges of lines.
SCI_GETGAPPOSITION returns the current gap position.
+ This is a hint that applications can use to avoid calling SCI_GETRANGEPOINTER
+ with a range that contains the gap and consequent costs of moving the gap.
A Scintilla window and the document that it displays are separate entities. When you create -- cgit v1.2.3