From 8ae049afbcfa4d37ec5abd81e2df8bf92af1b7d0 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 29 Dec 2023 02:56:37 +0100 Subject: [PATCH] Use 64-bit positions instead of 32-bit obsolete ones ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14359/files#r1437502252 --- PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index e238d96a7..e8cad4139 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -558,7 +558,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa size_t docLen = getCurrentDocLen(); char eolStr[3]; - Sci_TextRange tr; + Sci_TextRangeFull tr; tr.chrg.cpMin = posStart; tr.chrg.cpMax = posEnd + 2; if (tr.chrg.cpMax > static_cast(docLen)) @@ -568,7 +568,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa tr.lpstrText = eolStr; if (tr.chrg.cpMin != tr.chrg.cpMax) - execute(SCI_GETTEXTRANGE, 0, reinterpret_cast(&tr)); + execute(SCI_GETTEXTRANGEFULL, 0, reinterpret_cast(&tr)); // Remember EOL length // in the case of other characters let Scintilla do its job