mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-04-08 17:15:37 +02:00
Change fuction names for the code readability
This commit is contained in:
parent
6f473da4ca
commit
12f59ed528
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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 ||\
|
||||
|
Loading…
x
Reference in New Issue
Block a user