Use 64-bit positions instead of 32-bit obsolete ones

ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14359/files#r1437502252
This commit is contained in:
Don Ho 2023-12-29 02:56:37 +01:00
parent c1fa9273e5
commit 8ae049afbc
1 changed files with 2 additions and 2 deletions

View File

@ -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<Sci_PositionCR>(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<LPARAM>(&tr));
execute(SCI_GETTEXTRANGEFULL, 0, reinterpret_cast<LPARAM>(&tr));
// Remember EOL length
// in the case of other characters let Scintilla do its job