Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error after making modifications or otherwise leaving insert mode #33

Closed
samf opened this issue Aug 3, 2020 · 6 comments
Closed

error after making modifications or otherwise leaving insert mode #33

samf opened this issue Aug 3, 2020 · 6 comments
Labels

Comments

@samf
Copy link

samf commented Aug 3, 2020

When I run with autocmd FileType * AnyFoldActivate in my vimrc, I get the following error after modifying the buffer:

Error detected while processing InsertLeave Autocommands for "<buffer=1>"..function <SNR>103_ReloadFolds:
line   38:
E111: Missing ']'

This has started happening only recently. Strangely, you haven't modified vim-anyfold recently. I've tried removing each of my other plugins in turn, and the problem remains. Perhaps a newer version of vim is causing this?

@samf
Copy link
Author

samf commented Aug 3, 2020

I should have mentioned: my current vim is version 8.2.1350.

@samf
Copy link
Author

samf commented Aug 3, 2020

If I comment out line 496:

let b:anyfold_commentlines[changed[0]-1 : changed[1]-1] = s:MarkCommentLines(changed[0], changed[1])

then the problem goes away.

But it looks to me like your [s match with your ]s. I can't see the flaw, but I don't speak vim either. Again, maybe the problem is not in your code, but in recent versions of vim itself.

@pseewald
Copy link
Owner

pseewald commented Aug 3, 2020

Interesting and weird. You're using a very recent version of vim (2 days old) so I just hope this is going to be fixed in Vim soon. I looked for vim issues related to list slicing and I found this and this. So it seems that list slicing does not work unconditionally in vim.

@pseewald pseewald added the bug label Aug 3, 2020
@StarWitch
Copy link

Confirming that I'm also receiving this error, also version 1350. Reverting to version 1300 fixes it for me.

@StarWitch
Copy link

Looks like 1400 (released today on Mac Homebrew) fixes it. 😄

@pseewald
Copy link
Owner

Thanks a lot for letting me know, this can be closed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants