using `editor.buffer.getLines().join('\n')` as more reliable buffer reference