addLinesAfter method

void addLinesAfter(
  1. AFCommandContext context,
  2. RegExp match,
  3. List<String> toInsert
)

Adds a sete of lines after the first line containing match

Implementation

void addLinesAfter(AFCommandContext context, RegExp match, List<String> toInsert) {
  modified = true;
  final idx = firstLineContaining(context, match);
  if(idx < 0) {
    _throwMissingMatchRegex(match);
  } else {
    lines.insertAll(idx+1, toInsert);
  }
}