Damian-Conway-s-Vim-Setup icon indicating copy to clipboard operation
Damian-Conway-s-Vim-Setup copied to clipboard

Error in all perl files.

Open exodist opened this issue 3 years ago • 4 comments

Not fully sure what happened. I have been using trackperlvars.vim for a couple years now without problem. Yesterday I did a system update, I am guessing it updated vim (I was not paying attention). Now every time I open a perl file or try to move my cursor I get this:

Error detected while processing CursorMoved Autocommands for "<buffer=1>"..function TPV_track_perl_var[137]..CursorMoved Autocommands for "<buffer=1>"..function TPV_track_perl_var: line 11: E803: ID not found: 664668

If I disable the plugin I do not get the error anymore.

I have tracked it to this line:

391 " Remove previous highlighting... 392 try | call matchdelete(s:match_id) | catch /./ | endtry

If I comment out line 392 I no longer get the error, but only the first thing I highlight ever gets highlighted (obviously) and it never goes away (also obvious).

I am very perplexed as I would expect the try/catch construct to catch such errors.... I know almost nothing about vim scripting though, so maybe there is something obvious I am missing.

exodist avatar Oct 06 '21 18:10 exodist

Should also add that I removed all my custom vim stuff except for trackperlvars.vim and it still had the error, so using nothing but pure system vim + trackperlvars it still happens.

exodist avatar Oct 06 '21 18:10 exodist

I ran into this today as well. I'm not completely sure why, but it seems like vim no longer likes the | line combining trick there. Ditching the pipes and turning that into an actual multi line thing fixed it for me

klp2 avatar Oct 06 '21 19:10 klp2

@klp2 that seems to have fixed it for me as well, thank you!

exodist avatar Oct 06 '21 19:10 exodist

Thanks for the fix. Very handy. I wish there was an obvious way to incorporate this into vim-perl.

petdance avatar Jun 30 '22 18:06 petdance