mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-19 20:04:38 +02:00
parent
c7c5db7c51
commit
e6fe568bbf
@ -963,6 +963,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
{
|
{
|
||||||
BufferID idd = _mainDocTab.getBufferByIndex(id);
|
BufferID idd = _mainDocTab.getBufferByIndex(id);
|
||||||
Buffer * buf = MainFileManager.getBufferByID(idd);
|
Buffer * buf = MainFileManager.getBufferByID(idd);
|
||||||
|
if (buf == nullptr)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
tipTmp = buf->getFullPathName();
|
tipTmp = buf->getFullPathName();
|
||||||
|
|
||||||
if (tipTmp.length() >= tipMaxLen)
|
if (tipTmp.length() >= tipMaxLen)
|
||||||
@ -975,6 +978,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
{
|
{
|
||||||
BufferID idd = _subDocTab.getBufferByIndex(id);
|
BufferID idd = _subDocTab.getBufferByIndex(id);
|
||||||
Buffer * buf = MainFileManager.getBufferByID(idd);
|
Buffer * buf = MainFileManager.getBufferByID(idd);
|
||||||
|
if (buf == nullptr)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
tipTmp = buf->getFullPathName();
|
tipTmp = buf->getFullPathName();
|
||||||
|
|
||||||
if (tipTmp.length() >= tipMaxLen)
|
if (tipTmp.length() >= tipMaxLen)
|
||||||
|
@ -77,8 +77,10 @@ static void ColouriseSearchResultLine(SearchResultMarkings* pMarkings, char *lin
|
|||||||
|
|
||||||
styler.ColourTo(startLine + currentPos - 1, SCE_SEARCHRESULT_LINE_NUMBER);
|
styler.ColourTo(startLine + currentPos - 1, SCE_SEARCHRESULT_LINE_NUMBER);
|
||||||
|
|
||||||
int currentStat = SCE_SEARCHRESULT_DEFAULT;
|
int currentState = SCE_SEARCHRESULT_DEFAULT;
|
||||||
|
|
||||||
|
if (linenum >= pMarkings->_length)
|
||||||
|
return;
|
||||||
SearchResultMarkingLine miLine = pMarkings->_markings[linenum];
|
SearchResultMarkingLine miLine = pMarkings->_markings[linenum];
|
||||||
|
|
||||||
for (std::pair<intptr_t, intptr_t> mi : miLine._segmentPostions)
|
for (std::pair<intptr_t, intptr_t> mi : miLine._segmentPostions)
|
||||||
@ -92,11 +94,11 @@ static void ColouriseSearchResultLine(SearchResultMarkings* pMarkings, char *lin
|
|||||||
if (match_end <= endPos)
|
if (match_end <= endPos)
|
||||||
styler.ColourTo(match_end, SCE_SEARCHRESULT_WORD2SEARCH);
|
styler.ColourTo(match_end, SCE_SEARCHRESULT_WORD2SEARCH);
|
||||||
else
|
else
|
||||||
currentStat = SCE_SEARCHRESULT_WORD2SEARCH;
|
currentState = SCE_SEARCHRESULT_WORD2SEARCH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
styler.ColourTo(endPos, currentStat);
|
styler.ColourTo(endPos, currentState);
|
||||||
}
|
}
|
||||||
else // every character - search header
|
else // every character - search header
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user