Fix Trim Operations not working on selection
Trim Operations works for entire document only. Now selection for Trim Operations is supported. Fix #12602, close #12626
This commit is contained in:
parent
4e4d9d95ce
commit
bf34ef0dd5
|
@ -1487,7 +1487,9 @@ void Notepad_plus::doTrim(trimOp whichPart)
|
||||||
return;
|
return;
|
||||||
env._str4Replace = TEXT("");
|
env._str4Replace = TEXT("");
|
||||||
env._searchType = FindRegex;
|
env._searchType = FindRegex;
|
||||||
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
bool isEntireDoc = _pEditView->execute(SCI_GETSELECTIONSTART) == _pEditView->execute(SCI_GETSELECTIONEND);
|
||||||
|
env._isInSelection = !isEntireDoc;
|
||||||
|
_findReplaceDlg.processAll(ProcessReplaceAll, &env, isEntireDoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Notepad_plus::removeEmptyLine(bool isBlankContained)
|
void Notepad_plus::removeEmptyLine(bool isBlankContained)
|
||||||
|
|
Loading…
Reference in New Issue