inkarkat / vim-ingo-library

Vimscript library of common functions
91 stars 7 forks source link

:Mark does not respect \V for some patterns? #3

Closed justinmk closed 1 month ago

justinmk commented 1 month ago

Describe the bug

The following command yields error E944: Reverse range in character class:

:Mark /\V[[a-S]]/

In contrast, using builtin / to search for \V[[a-S]] does not yield this error (but without \V it does).

How to Reproduce

Run the above command.

Expected Behavior

The \V should be respected and there should be no complaint about a character class because the [...] should be treated as literal instead of magic.

Environment

inkarkat commented 1 month ago

Thanks for reporting this! I rarely change the magicness of patterns, so the normalization (which is handled by the ingo-library, not the Mark plugin) missed a corner case.