non-regex based implementation of split_lines
remove useless SelectionList copy in keep
update TODO