diff options
author | Neil <nyamatongwe@gmail.com> | 2022-10-19 13:36:08 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-10-19 13:36:08 +1100 |
commit | e9280bf01239e81b01899992647766d0c073253b (patch) | |
tree | 924d5f1a128552bf8c0b92f8c579544f34edc0ed /test/ScintillaCallable.py | |
parent | 19a781319ccc6c9de302182e141383ba73403030 (diff) | |
download | scintilla-mirror-e9280bf01239e81b01899992647766d0c073253b.tar.gz |
Feature [feature-requests:#1455] Implement GetStyledTextFull as a 64-bit safe
version of GetStyledText.
Diffstat (limited to 'test/ScintillaCallable.py')
-rw-r--r-- | test/ScintillaCallable.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ScintillaCallable.py b/test/ScintillaCallable.py index d8d16c7e3..126281aac 100644 --- a/test/ScintillaCallable.py +++ b/test/ScintillaCallable.py @@ -172,6 +172,16 @@ class ScintillaCallable: styledText = tr.lpstrText[:length] styledText += b"\0" * (length - len(styledText)) return styledText + def StyledTextRangeFull(self, start, end): + tr = TEXTRANGEFULL() + tr.cpMin = start + tr.cpMax = end + length = 2 * (end - start) + tr.lpstrText = ctypes.create_string_buffer(length + 2) + self.GetStyledTextFull(0, ctypes.byref(tr)) + styledText = tr.lpstrText[:length] + styledText += b"\0" * (length - len(styledText)) + return styledText def FindBytes(self, start, end, s, flags): ft = FINDTEXT() ft.cpMin = start |