preservim / nerdcommenter

Vim plugin for intensely nerdy commenting powers
Creative Commons Zero v1.0 Universal
4.97k stars 447 forks source link

infinite recursion when trying to comment glsl code #518

Closed minoaut closed 1 year ago

minoaut commented 1 year ago

Lately I'm getting a screen filling error message in vim whenever I try to comment shader code.

infinite recursion

I have this in .vimrc:

        let g:NERDRemoveExtraSpaces = 1
        let g:NERDAltDelims_gsl = 1
        let g:NERDCustomDelimiters = { 'gsl': { 'left': '//' }, 'glslx': { 'left': '//' }  }

git bisect found this commit https://github.com/preservim/nerdcommenter/commit/91499c76a7358b10945c50173fa8c64dc3c909c8

When I revert this the problem is gone.

alerque commented 1 year ago

@ppwwyyxx Does this ring a bell? I remember in #514 we tried to fix something, but it caused issues for me and others so we reverted it, then in #515 put in a modified fix. This is working for me (NeoVIM & the languages I work with) but apparently it is still causing issues for some folks. Any ideas?

ppwwyyxx commented 1 year ago

@minoaut could you try if #519 can fix it? If not, I'll need to know more about how to exactly reproduce your issue.

alerque commented 1 year ago

@minoaut I think @ppwwyyxx found and fixed the issue for you, you can update and give it a shot now.

minoaut commented 1 year ago

Yep, can confirm, after resetting the tree and updating the error is gone. That was quick, thank you both. NERD Commenter is awesome!