duplicateLinesAbove method
Duplicates the selected lines, or the current line, above the current block and moves the selection/cursor to the duplicate.
Implementation
bool duplicateLinesAbove() {
return _runEditFrame(() {
_beginHistoryAction(_TextAreaHistoryAction.transform, breakChain: true);
final result = textDuplicateSelectedLinesAboveDocument(
document: _document,
state: _currentLineStateSnapshot(),
);
if (!result.changed) {
return false;
}
_recordUndoSnapshot();
_applyOffsetCommandResult(result);
return true;
});
}