feat(buffer_updates): allow ignoring when previewing

Also adds a test that we actually subscribe to buffer events when in
CMDPREVIEW.
This commit is contained in:
Thomas Vigouroux
2020-12-15 22:18:35 +01:00
parent d0112693a3
commit 25e20da550
5 changed files with 33 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ function M._create_parser(bufnr, lang, opts)
end
end
a.nvim_buf_attach(self.bufnr, false, {on_bytes=bytes_cb, on_detach=detach_cb})
a.nvim_buf_attach(self.bufnr, false, {on_bytes=bytes_cb, on_detach=detach_cb, preview=true})
self:parse()