-
Notifications
You must be signed in to change notification settings - Fork 6
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
Multibyte pair \( and \) causing errors. #71
Comments
It is indeed screwy regex. auto-pairs/autoload/autopairs.vim Line 261 in 26dca00
For comparison, this is from AutoPairsInsert, which is fine: auto-pairs/autoload/autopairs.vim Line 162 in 26dca00
The problem is that I use As for the enter problem, same cause, in theory. Missing escape. Weird thing though, it doesn't error out for me (admittedly in Vim). I don't understand why, but I mean, if I can fix it anyway, it doesn't really matter. I really need to revisit a large part of the pattern matching. I'll make a hotfix for the errors (or try anyway), but if that doesn't fix return, that's a wontfix until #53 is fixed (which I've been putting off because of Other Stuff:tm:, but no time like the present I suppose) |
Many thanks for your quick response (and continued work on auto-pairs)! I'll await your hotfix and report back; let me know if you'd like me to test anything else related to this. |
Hotfix pushed; confirmation it also works in neovim would be great! |
I can confirm that BS and CR now work as expected in Neovim also. Thanks again! |
OS Arch Linux
What vim? (+ version) Neovim 0.8 and 0.9.0-dev
Autopairs config (if applicable):
Describe the bug
I'm using the above multibyte pairs for latex.
\[
and\left(
work fine and are just here for comparison.\(
also works fine and creates the associated\)
pair, however if I then hit backspace I get the warning:then
However the deletion works (it just deletes one byte so I end up with
\|\)
where|
is the cursor position). Deleting the other three bytes now also results in these same two errors being repeated three more times.As another scenario, after creating the matched pairs
\(|\)
if I hit<CR>
I get the error:and then the CR happens so I end up with:
instead of
as happens with, e.g. ( and ).
Since this doesn't happen with the matched pairs
\[|\]
or\left(|\right)
my assumption is it's some screwy regex related to #53. I've tested this on all three branches and an otherwise blank config (except for bootstrapping packer and loading auto-pairs with the above settings) and all have this issue.The text was updated successfully, but these errors were encountered: