mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-09-26 03:18:47 +02:00
Rename sortAllLines -> sortEntireDocument.
This commit is contained in:
parent
e258bcb3a7
commit
6f004d86a4
@ -2970,8 +2970,8 @@ void ScintillaEditView::sortLines(size_t fromLine, size_t toLine, bool isDescend
|
|||||||
const generic_string text = getGenericTextAsString(startPos, endPos);
|
const generic_string text = getGenericTextAsString(startPos, endPos);
|
||||||
std::vector<generic_string> splitText = stringSplit(text, getEOLString());
|
std::vector<generic_string> splitText = stringSplit(text, getEOLString());
|
||||||
const size_t lineCount = execute(SCI_GETLINECOUNT);
|
const size_t lineCount = execute(SCI_GETLINECOUNT);
|
||||||
const bool sortAllLines = toLine == lineCount - 1;
|
const bool sortEntireDocument = toLine == lineCount - 1;
|
||||||
if (!sortAllLines)
|
if (!sortEntireDocument)
|
||||||
{
|
{
|
||||||
if (splitText.rbegin()->empty())
|
if (splitText.rbegin()->empty())
|
||||||
{
|
{
|
||||||
@ -2990,7 +2990,7 @@ void ScintillaEditView::sortLines(size_t fromLine, size_t toLine, bool isDescend
|
|||||||
sortedText = lexicographicSort(splitText, isDescending);
|
sortedText = lexicographicSort(splitText, isDescending);
|
||||||
}
|
}
|
||||||
const generic_string joined = stringJoin(sortedText, getEOLString());
|
const generic_string joined = stringJoin(sortedText, getEOLString());
|
||||||
if (sortAllLines)
|
if (sortEntireDocument)
|
||||||
{
|
{
|
||||||
replaceTarget(joined.c_str(), startPos, endPos);
|
replaceTarget(joined.c_str(), startPos, endPos);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user