neovim/runtime
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
..
autoload vim-patch:98b73eb: runtime(netrw): prevent accidental data loss 2024-06-04 23:15:50 +02:00
colors
compiler vim-patch:9.1.0442: hare runtime files outdated (#29011) 2024-05-26 07:11:50 +08:00
doc feat(lsp): include end_col, end_lnum in vim.lsp.buf.locations_to_items #29164 2024-06-09 18:14:55 -07:00
ftplugin fix(runtime): add commentstring for glsl ftplugin 2024-06-09 14:51:22 +02:00
indent vim-patch:76174e7: runtime(asm): remove the indent plugin since it has too many issues 2024-05-27 06:59:01 +02:00
keymap
lua fix(glob): handle overlapping {} condition elements #29236 2024-06-10 04:23:03 -07:00
macros
pack/dist/opt
plugin
queries build(deps): bump tree-sitter-query to v0.4.0 2024-05-26 12:38:20 +02:00
spell
syntax vim-patch:d6b4afb: runtime(java): Exclude lambda expressions from _when_ _switch-case_ label clauses (vim/vim#14945) 2024-06-10 00:23:18 +02:00
tools
tutor docs: misc (#28837) 2024-06-07 10:55:14 +08:00
CMakeLists.txt
delmenu.vim
filetype.lua
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
macmap.vim
makemenu.vim
menu.vim
mswin.vim
neovim.ico
nvim.appdata.xml
nvim.desktop
nvim.png
optwin.vim vim-patch:9.1.0469: Cannot have buffer-local value for 'completeopt' 2024-06-06 06:07:31 +08:00
synmenu.vim