fix accumulating editor slowness in R Markdown mode