Change fuction names for the code readability

This commit is contained in:
Don Ho 2025-02-19 14:46:27 +01:00
parent 6f473da4ca
commit 12f59ed528
4 changed files with 7 additions and 28 deletions

View File

@ -147,7 +147,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
}
else if ((notification->margin == ScintillaEditView::_SC_MARGE_SYMBOL) && !notification->modifiers)
{
if (!_pEditView->markerMarginClick(lineClick))
if (!_pEditView->hidelineMarkerClicked(lineClick))
bookmarkToggle(lineClick);
}
break;

View File

@ -649,13 +649,13 @@ void Buffer::setHideLineChanged(bool isHide, size_t location)
{
//First run through all docs without removing markers
for (int i = 0; i < _references; ++i)
_referees.at(i)->notifyHideMarkers(this, isHide, location, false); // (i == _references-1));
_referees.at(i)->notifyHidelineMarkers(this, isHide, location, false); // (i == _references-1));
if (!isHide) // no deleting if hiding lines
{
//Then all docs to remove markers.
for (int i = 0; i < _references; ++i)
_referees.at(i)->notifyHideMarkers(this, isHide, location, true);
_referees.at(i)->notifyHidelineMarkers(this, isHide, location, true);
}
}

View File

@ -4130,7 +4130,7 @@ void ScintillaEditView::hideLines()
_currentBuffer->setHideLineChanged(true, startMarker);
}
bool ScintillaEditView::markerMarginClick(intptr_t lineNumber)
bool ScintillaEditView::hidelineMarkerClicked(intptr_t lineNumber)
{
auto state = execute(SCI_MARKERGET, lineNumber);
bool openPresent = (state & (1 << MARK_HIDELINESBEGIN)) != 0;
@ -4169,7 +4169,7 @@ bool ScintillaEditView::markerMarginClick(intptr_t lineNumber)
return true;
}
void ScintillaEditView::notifyHideMarkers(Buffer * buf, bool isHide, size_t location, bool del)
void ScintillaEditView::notifyHidelineMarkers(Buffer * buf, bool isHide, size_t location, bool del)
{
if (buf != _currentBuffer) //if not visible buffer dont do a thing
return;

View File

@ -815,35 +815,14 @@ public:
void styleChange();
void hideLines();
bool markerMarginClick(intptr_t lineNumber); //true if it did something
void notifyHideMarkers(Buffer * buf, bool isHide, size_t location, bool del);
bool hidelineMarkerClicked(intptr_t lineNumber); //true if it did something
void notifyHidelineMarkers(Buffer * buf, bool isHide, size_t location, bool del);
void hideMarkedLines(size_t searchStart, bool endOfDoc);
void showHiddenLines(size_t searchStart, bool endOfDoc, bool doDelete);
void restoreHiddenLines();
bool hasSelection() const { return !execute(SCI_GETSELECTIONEMPTY); };
bool isSelecting() const {
static Sci_CharacterRangeFull previousSelRange = getSelection();
Sci_CharacterRangeFull currentSelRange = getSelection();
if (currentSelRange.cpMin == currentSelRange.cpMax)
{
previousSelRange = currentSelRange;
return false;
}
if ((previousSelRange.cpMin == currentSelRange.cpMin) || (previousSelRange.cpMax == currentSelRange.cpMax))
{
previousSelRange = currentSelRange;
return true;
}
previousSelRange = currentSelRange;
return false;
};
bool isPythonStyleIndentation(LangType typeDoc) const{
return (typeDoc == L_PYTHON || typeDoc == L_COFFEESCRIPT || typeDoc == L_HASKELL ||\
typeDoc == L_C || typeDoc == L_CPP || typeDoc == L_OBJC || typeDoc == L_CS || typeDoc == L_JAVA ||\