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

Can not detect brace when 2 are following #205

Closed
ArnaudD-FR opened this issue Jan 13, 2023 · 3 comments
Closed

Can not detect brace when 2 are following #205

ArnaudD-FR opened this issue Jan 13, 2023 · 3 comments
Assignees
Labels

Comments

@ArnaudD-FR
Copy link

Simple .editorconfig example:

[*.{h,h{xx,++,h,pp},c,c{xx,++,c}}]
indent_style = tab
indent_size = 8

From the final }}, only one right brace is detected instead of two:

Header? <[*.{h,h{xx,++,h,pp},c,c{xx,++,c,pp}}]>
- ini#matches_filename: checking </home/arnaud/dev/uwb-stack/mac/fira_session_fsm.c> against <**/*.{h,h{xx,++,h,pp},c,c{xx,++,c,pp}}> with respect to config file </home/arnaud/dev/
uwb-stack/.editorconfig>
- ini#matches_filename: config_dirname is /home/arnaud/dev/uwb-stack
- fnmatch#fnmatch testing </home/arnaud/dev/uwb-stack/mac/fira_session_fsm.c> against <**/*.{h,h{xx,++,h,pp},c,c{xx,++,c,pp}}> wrt </home/arnaud/dev/uwb-stack>
- fnmatch#translate: pattern **/*.{h,h{xx,++,h,pp},c,c{xx,++,c,pp}}
- 38 chars
    *    *    /    *    .    {    h    ,    h    {    x    x    ,    +    +    ,    h    ,    p    p    }    ,    c    ,    c    {    x    x    ,    +    +    ,    c    ,    p    p
    }    }
   2a   2a   2f   2a   2e   7b   68   2c   68   7b   78   78   2c   2b   2b   2c   68   2c   70   70   7d   2c   63   2c   63   7b   78   78   2c   2b   2b   2c   63   2c   70   70
   7d   7d
translate: left=1,1,1; right: 1,1

I added the last log line translate to show the content of l:left_braces and l:right_braces

So there is an issue in let s:RIGHT_BRACE = '\v%(^|[^\\])\}' but I don't understand the meaning of %

@cxw42 cxw42 added the Bug label Jan 15, 2023
@cxw42 cxw42 self-assigned this Jan 15, 2023
@cxw42
Copy link
Member

cxw42 commented Jan 15, 2023

Thanks for reporting! I am able to reproduce.

@cxw42
Copy link
Member

cxw42 commented Jan 15, 2023

I just merged #199, which fixes this in my testing. Please try the latest and reopen if it still doesn't work for you! Thanks!

@cxw42 cxw42 closed this as completed Jan 15, 2023
@ArnaudD-FR
Copy link
Author

Thanks! It works perfectly!

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

2 participants