I was wondering if there was any particular reason that in the middle of 
the matchparen script,
an eval is used as the if condition instead of just running the code 
directly.

    s_skip = '!empty(filter(map(synstack(line("."), col(".")), 
''synIDattr(v:val, "name")''), ' ..
      '''v:val =~? 
"string\\|character\\|singlequote\\|escape\\|symbol\\|comment"''))'
    # If executing the expression determines that the cursor is currently 
in...
    try
      if eval(s_skip)
        s_skip = "0"
      endif
    catch /^Vim\%((\a\+)\)\=:E363/
      # We won't find anything, so skip searching, should keep Vim 
responsive.
      return
    endtry

I was trying to understand why that couldn't just be executed directly in 
the if condition.

Thanks,

TJ
On Tuesday, August 23, 2022 at 3:32:36 PM UTC-4 Heptite wrote:

> I've attached another bugfix version.
>
> On Mon, Aug 22, 2022 at 6:01 AM Bram Moolenaar <[email protected]> 
> wrote:
>
>>
>> Christian J. Robinson wrote:
>>
>> > I've attached a Vim 9 implementation of the matchparen.vim plugin.
>> > 
>> > There was a fair amount of logic to determine whether features existed, 
>> but
>> > since this is a Vim 9 implementation it is safe to assume those features
>> > will exist so that logic was removed.
>>
>> Thank you for doing this.  I hope several people try it out and let us
>> know how well it works.  If everybody is happy I can include it in the
>> distribution.
>>
>>
>> -- 
>> If "R" is Reverse, how come "D" is FORWARD?
>>
>>  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net  
>>  \\\
>> ///                                                                      
>> \\\
>> \\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ 
>> ///
>>  \\\            help me help AIDS victims -- http://ICCF-Holland.org    
>> ///
>>
>
>
> -- 
> Christian J. Robinson <[email protected]>
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/60a1bff8-556f-4aab-92db-fea37bec4b37n%40googlegroups.com.

Raspunde prin e-mail lui