Use 64-bit positions instead of 32-bit obsolete ones
ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14359/files#r1437502252pull/14527/head
parent
c1fa9273e5
commit
8ae049afbc
|
@ -558,7 +558,7 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
||||||
size_t docLen = getCurrentDocLen();
|
size_t docLen = getCurrentDocLen();
|
||||||
|
|
||||||
char eolStr[3];
|
char eolStr[3];
|
||||||
Sci_TextRange tr;
|
Sci_TextRangeFull tr;
|
||||||
tr.chrg.cpMin = posStart;
|
tr.chrg.cpMin = posStart;
|
||||||
tr.chrg.cpMax = posEnd + 2;
|
tr.chrg.cpMax = posEnd + 2;
|
||||||
if (tr.chrg.cpMax > static_cast<Sci_PositionCR>(docLen))
|
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;
|
tr.lpstrText = eolStr;
|
||||||
|
|
||||||
if (tr.chrg.cpMin != tr.chrg.cpMax)
|
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
|
// Remember EOL length
|
||||||
// in the case of other characters let Scintilla do its job
|
// in the case of other characters let Scintilla do its job
|
||||||
|
|
Loading…
Reference in New Issue