mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-29 16:54:43 +02:00
Remove more conversion from Scintilla
This commit is contained in:
parent
b0e19a786e
commit
9b832dbb2c
@ -1290,7 +1290,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
|
||||
case WM_FRSAVE_INT:
|
||||
{
|
||||
_macro.push_back(recordedMacroStep(static_cast<int32_t>(wParam), 0, static_cast<long>(lParam), NULL, recordedMacroStep::mtSavedSnR));
|
||||
_macro.push_back(recordedMacroStep(static_cast<int32_t>(wParam), 0, lParam, NULL, recordedMacroStep::mtSavedSnR));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -500,7 +500,7 @@ bool Finder::notify(SCNotification *notification)
|
||||
|
||||
size_t pos = notification->position;
|
||||
if (pos == INVALID_POSITION)
|
||||
pos = static_cast<int32_t>(_scintView.execute(SCI_GETLINEENDPOSITION, notification->line));
|
||||
pos = _scintView.execute(SCI_GETLINEENDPOSITION, notification->line);
|
||||
_scintView.execute(SCI_SETSEL, pos, pos);
|
||||
|
||||
gotoFoundLine();
|
||||
|
@ -380,13 +380,13 @@ void FunctionCallTip::showCalltip()
|
||||
//Check if the current overload still holds. If the current param exceeds amounti n overload, see if another one fits better (enough params)
|
||||
stringVec & params = _overloads.at(_currentOverload);
|
||||
size_t psize = params.size()+1;
|
||||
if ((size_t)_currentParam >= psize)
|
||||
if (_currentParam >= psize)
|
||||
{
|
||||
size_t osize = _overloads.size();
|
||||
for (size_t i = 0; i < osize; ++i)
|
||||
{
|
||||
psize = _overloads.at(i).size()+1;
|
||||
if ((size_t)_currentParam < psize)
|
||||
if (_currentParam < psize)
|
||||
{
|
||||
_currentOverload = static_cast<int32_t>(i);
|
||||
break;
|
||||
@ -408,7 +408,7 @@ void FunctionCallTip::showCalltip()
|
||||
size_t nbParams = params.size();
|
||||
for (size_t i = 0; i < nbParams; ++i)
|
||||
{
|
||||
if (int(i) == _currentParam)
|
||||
if (i == _currentParam)
|
||||
{
|
||||
highlightstart = static_cast<int>(callTipText.str().length());
|
||||
highlightend = highlightstart + lstrlen(params.at(i));
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
stringVec _descriptions; //vecotr of function descriptions
|
||||
size_t _currentNbOverloads = 0; //current amount of overloads
|
||||
size_t _currentOverload = 0; //current chosen overload
|
||||
int _currentParam = 0; //current highlighted param
|
||||
size_t _currentParam = 0; //current highlighted param
|
||||
|
||||
TCHAR _start = '(';
|
||||
TCHAR _stop = ')';
|
||||
|
@ -1705,7 +1705,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
||||
if (typeDoc >= L_EXTERNAL && typeDoc < NppParameters::getInstance().L_END)
|
||||
setExternalLexer(typeDoc);
|
||||
else
|
||||
execute(SCI_SETLEXER, (_codepage == CP_CHINESE_TRADITIONAL)?SCLEX_MAKEFILE:SCLEX_NULL);
|
||||
execute(SCI_SETLEXER, (_codepage == CP_CHINESE_TRADITIONAL) ? SCLEX_MAKEFILE : SCLEX_NULL);
|
||||
break;
|
||||
|
||||
}
|
||||
@ -3539,7 +3539,6 @@ void ScintillaEditView::runMarkers(bool doHide, size_t searchStart, bool endOfDo
|
||||
if (isInSection && !isFolded(i))
|
||||
{
|
||||
execute(SCI_SHOWLINES, startShowing, i);
|
||||
//startShowing = execute(SCI_GETLASTCHILD, i, (levelLine & SC_FOLDLEVELNUMBERMASK));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -275,12 +275,12 @@ public:
|
||||
|
||||
Sci_CharacterRange getSelection() const {
|
||||
Sci_CharacterRange crange;
|
||||
crange.cpMin = long(execute(SCI_GETSELECTIONSTART));
|
||||
crange.cpMax = long(execute(SCI_GETSELECTIONEND));
|
||||
crange.cpMin = static_cast<Sci_PositionCR>(execute(SCI_GETSELECTIONSTART));
|
||||
crange.cpMax = static_cast<Sci_PositionCR>(execute(SCI_GETSELECTIONEND));
|
||||
return crange;
|
||||
};
|
||||
|
||||
void getWordToCurrentPos(TCHAR * str, int strLen) const {
|
||||
void getWordToCurrentPos(TCHAR * str, INT_PTR strLen) const {
|
||||
auto caretPos = execute(SCI_GETCURRENTPOS);
|
||||
auto startPos = execute(SCI_WORDSTARTPOSITION, caretPos, true);
|
||||
|
||||
@ -426,7 +426,7 @@ public:
|
||||
|
||||
int getTextZoneWidth() const;
|
||||
|
||||
void gotoLine(int line){
|
||||
void gotoLine(INT_PTR line){
|
||||
if (line < execute(SCI_GETLINECOUNT))
|
||||
execute(SCI_GOTOLINE,line);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user