Files
neovim/runtime/lua/vim
Jon Huhn 4bd86120d4 fix(glob): handle overlapping {} condition elements #29236
This change fixes an issue where glob patterns like `{a,ab}` would not
match `ab` because the first option `a` matches, then the end of the
string is expected but `b` is found, and LPeg does not backtrack to try
the next option `ab` which would match. The fix here is to also append
the rest of the pattern to the generated LPeg pattern for each option.
This changes a glob `{a,ab}` from being parsed as

    ("a" or "ab") "end of string"

to

    ("a" "end of string" or "ab" "end of string")

Here, matching against `ab` would try the first option, fail to match,
then proceed to the next option, and match.

The sacrifice this change makes is dropping support for nested `{}`
conditions, which VSCode doesn't seem to support or test AFAICT.

Fixes #28931

Co-authored-by: Sergey Slipchenko <faergeek@gmail.com>
2024-06-10 04:23:03 -07:00
..
2024-05-27 20:48:46 +02:00
2024-06-08 21:38:06 +02:00
2024-06-07 10:55:14 +08:00
2024-03-06 10:45:22 +00:00
2024-04-26 15:13:06 +01:00
2024-05-27 20:48:46 +02:00
2024-06-07 10:55:14 +08:00
2024-06-07 10:55:14 +08:00
2024-01-16 09:33:10 +00:00
2024-05-27 20:48:46 +02:00
2024-03-16 19:26:10 +00:00
2024-03-16 19:26:10 +00:00
2024-06-08 21:38:06 +02:00
2024-04-30 07:04:42 +08:00
2024-03-16 19:26:10 +00:00
2024-06-03 15:33:10 +02:00
2024-03-09 11:21:55 +00:00