vm/document : port `_removeLines`