Describe the bug
Error detected while processing function <SNR>16_Highlight_Matching_Pair:
line 107:
E363: pattern uses more memory than 'maxmempattern'
From there on MacVim is unstable.
To Reproduce
Detailed steps to reproduce the behavior:
Email me at engelen @ acm.org to get the README.md
file.
open -a MacVim README.md
o
(open line) then The char[
at line 2734Environment (please complete the following information):
Additional context
Other glitches have been plaguing MacVim for months after updating, so I stopped updating since it only got worse. It used to be stable. Now sometimes lines are missing in the middle of the view when navigating with {
and }
(CTRL-L makes them reappear). Syntax highlighting is glitchy, sometimes lagging behind the movements. Please stop adding new features that we don't need and fix what used to work. Thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks for the quick reply. I tried the latest MacVim 8.2.1456 (165). Same problem.
Also non-GUI Vim 8.2 in a terminal has the same issue (I've used brew install vim
):
Now, when I try a
to edit the line after the [
this fails as text is inserted before the [
, not after. Also the syntax highlighting is gone, so I suspect that is causing the glitches. Because editing the line fails, I close Vim as I don't trust that what I see is what the file contains.
This issue does not happen with my old Vim 7.4.
My .vimrc settings (part of):
" Common options
set spelllang=en_us
" set spell
set nocp
set encoding=utf8
set ruler
set hlsearch
set scrolljump=4
set autoindent shiftwidth=2
set smarttab
set expandtab
set cindent
set ignorecase smartcase
" set cinwords=case,default,do,else,for,if,private,protected,public,switch,while
syntax on
" color DarkBlue
" highligh Normal guibg=Black
highlight LineNr guifg=Blue
highlight CursorLine guibg=bg
highlight CursorLineNr guifg=DarkYellow
autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufFilePre,BufRead *.bas set filetype=vb
I forgot the mention that vim --clean
also glitches. The error message disappears but the results are the same.
I forgot the mention that vim --clean also glitches. The error message disappears but the results are the same.
I am not sure what you mean by 'glitches', but by default I think the matchparen plugin is not loaded in such a case.
If you could share the README, I'd like to have a look. Thanks.
Attached is the README.md file.
I do not see it
Please contact me at the email address that I had suggested in my post (but now removed from public view). I also uploaded a copy here.
Were you able to download the README file from the URL?
It seems that this line triggers the error:
https://github.com/vim/vim/blob/2f1228463aa9ff62814f9732561b1849e5f01f75/runtime/syntax/markdown.vim#L82
The cost of this pattern (!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=
) seems high.
Loop unrolling (described in the book "Mastering Regular Expressions") might mitigate the error.
So, how about this?
--- a/runtime/syntax/markdown.vim +++ b/runtime/syntax/markdown.vim @@ -79,7 +79,7 @@ syn region markdownUrlTitle matchgroup=m syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+'+ end=+'+ keepend contained syn region markdownUrlTitle matchgroup=markdownUrlTitleDelimiter start=+(+ end=+)+ keepend contained -syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart +syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^][]*\%(\[\_[^][]*\]\_[^][]*\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
Cc: @tpope
Works for me, I'll add to my copy.
It looks like this problem has been successfully addressed by a patch from @k-takata and @tpope so let me close this issue here.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.
Closed #6777.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.