leafOfTree / vim-vue-plugin

Vim syntax and indent plugin for .vue files
The Unlicense
177 stars 9 forks source link

vue-plugin stops working if vim splits are opened via :Ex #39

Closed MichaelCromer closed 1 year ago

MichaelCromer commented 1 year ago

Opening as a single buffer, vue-plugin works fine. Creating a new split with :Explore or its variants (:Vex, :Hex, etc) causes all highlighting to disappear, leaving only grey text. The indent logic is also absent, so I guess the plugin crashes entirely.

Steps to reproduce:

> vim App.vue
:Vexplore      <-- crashes here

Creating a new split via <C-w>v or similar does not crash the plugin immediately, it's only when the content of a split changes to the file explorer.

> vim App.vue
<C-w>v         <-- no issues, works fine
:Explore       <-- crashes here

Opening a file in a split directly via :split or its variants also does not cause the problem.

> vim App.vue
:split foo.bar    <-- no issues, works fine

Given the way this occurs, I would guess it's something to do with netrw.

My vimrc is pretty minimal. I have these other plugins installed:

leafOfTree commented 1 year ago

Thanks for the detailed feedback, which is very helpful. Looks like it was caused by the use of timer_start. Its callback was invoked twice when creating a new split via:Ex.

The timer was introduced only for performance in the beginning, which is not very necessary now. So I just removed it. 8d75429260e32072f4a68cd6ba4473a48f6fb4e8 4d31393b03b18b55e59ef96b91882f94fd75e6db

MichaelCromer commented 1 year ago

Fixed on my machine! Thanks for your speedy efforts.