diff options
author | Neil <nyamatongwe@gmail.com> | 2018-03-09 21:05:33 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-03-09 21:05:33 +1100 |
commit | f8884c2adbb81bb91b3ac0d4bcaa8b9c62069f14 (patch) | |
tree | 0bcb5040b089eb140ce4fdef82411d68a3510a46 /src/ScintillaBase.cxx | |
parent | 73ca690be6390bdbd402d74bf85b71dea73761d0 (diff) | |
download | scintilla-mirror-f8884c2adbb81bb91b3ac0d4bcaa8b9c62069f14.tar.gz |
Backport: Use Position/Line/int more accurately in preparation for large documents.
Backport of changeset 6480:f2650eaa75e6.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index e367449ee..46804e7b3 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -212,7 +212,7 @@ void ScintillaBase::ListNotify(ListBoxEvent *plbe) { } } -void ScintillaBase::AutoCompleteInsert(Sci::Position startPos, int removeLen, const char *text, int textLen) { +void ScintillaBase::AutoCompleteInsert(Sci::Position startPos, Sci::Position removeLen, const char *text, Sci::Position textLen) { UndoGroup ug(pdoc); if (multiAutoCMode == SC_MULTIAUTOC_ONCE) { pdoc->DeleteChars(startPos, removeLen); @@ -240,15 +240,15 @@ void ScintillaBase::AutoCompleteInsert(Sci::Position startPos, int removeLen, co } } -void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { +void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list) { //Platform::DebugPrintf("AutoComplete %s\n", list); ct.CallTipCancel(); if (ac.chooseSingle && (listType == 0)) { if (list && !strchr(list, ac.GetSeparator())) { const char *typeSep = strchr(list, ac.GetTypesep()); - const int lenInsert = typeSep ? - static_cast<int>(typeSep-list) : static_cast<int>(strlen(list)); + const Sci::Position lenInsert = typeSep ? + static_cast<Sci::Position>(typeSep-list) : static_cast<Sci::Position>(strlen(list)); if (ac.ignoreCase) { // May need to convert the case before invocation, so remove lenEntered characters AutoCompleteInsert(sel.MainCaret() - lenEntered, lenEntered, list, lenInsert); @@ -424,7 +424,7 @@ void ScintillaBase::AutoCompleteCompleted(char ch, unsigned int completionMethod endPos = pdoc->ExtendWordSelect(endPos, 1, true); if (endPos < firstPos) return; - AutoCompleteInsert(firstPos, endPos - firstPos, selected.c_str(), static_cast<int>(selected.length())); + AutoCompleteInsert(firstPos, endPos - firstPos, selected.c_str(), static_cast<Sci::Position>(selected.length())); SetLastXChosen(); scn.nmhdr.code = SCN_AUTOCCOMPLETED; @@ -847,7 +847,7 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara switch (iMessage) { case SCI_AUTOCSHOW: listType = 0; - AutoCompleteStart(static_cast<int>(wParam), reinterpret_cast<const char *>(lParam)); + AutoCompleteStart(static_cast<Sci::Position>(wParam), reinterpret_cast<const char *>(lParam)); break; case SCI_AUTOCCANCEL: |