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

Code folding is broken for single-line varconst declarations #3576

Closed
dunric opened this issue Sep 2, 2023 · 0 comments · Fixed by #3577
Closed

Code folding is broken for single-line varconst declarations #3576

dunric opened this issue Sep 2, 2023 · 0 comments · Fixed by #3577
Labels

Comments

@dunric
Copy link

dunric commented Sep 2, 2023

environment: Vim 9.0, Linux x86_64

description: In case of single-line declarations of var or const blocks, invocation of code folding improperly swallows unrelated following lines, usually all, to the end of file. Declarations may be empty, non-empty, with a comment - it does not matter.

expected behavior: single-line declarations are unaffected with code folding and definitely should not fold unrelated lines which follow

how to replicate the issue:

  • insert single-line declaration of constants or variables
    const ()
  • insert some code after above declaration
    func main() {
        fmt.Println("Hello, world!")
    }
  • invoke code folding in that buffer (zM)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants