Home Download Buy Blog Forum Support

Matching bracket limit ?

Matching bracket limit ?

Postby bizoo on Fri Jun 24, 2011 12:13 pm

In files with lot of level of brackets like JSON or JavaScript, it look like there is a limit when Matching Bracket (like ctrl+M) stop to work for outer brackets.
It work for the small sets but not for the big ones (like most outer brackets).
An example is Ext JS 4 sources.

Jon, is this a bug or could you give us please the rules behind this behavior (number of brackets or data size between them ?).
Is this configurable ?
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Matching bracket limit ?

Postby jps on Sat Jun 25, 2011 10:30 am

There isn't a limit on the number of brackets, but there is a limit on how much of the buffer will be searched for the matches - it's currently 4000 characters for visualisation, and 10000 characters for jump to matching bracket.

Can you link/email me an example of the code that's giving you an issue?
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Matching bracket limit ?

Postby bizoo on Sat Jun 25, 2011 11:53 am

jps wrote:There isn't a limit on the number of brackets, but there is a limit on how much of the buffer will be searched for the matches - it's currently 4000 characters for visualisation, and 10000 characters for jump to matching bracket

I probably hit the limit, if I remember well there is more than 4000 lines in the files where I noticed it, so probably more than 10000 char.
Maybe the limit for jump matching must be increased since it's probably not hit the global performance of ST (I suppose it only search when the command is executed).
jps wrote:Can you link/email me an example of the code that's giving you an issue?

Default (Windows).sublime-keymap ;)
The outer bracket didn't work.

The others are both in Ext JS 4 package from Sencha, it's big JSON and big javascript.
Didn't find it online, but I could send you some of them on Monday if you need it.

Thanks for your reply.
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Matching bracket limit ?

Postby bizoo on Mon Jun 27, 2011 7:50 am

This an example from ExtJS 4.
The outer brackets doesn't work, there is more than 36000 char. between them.
Attachments
Button.zip
ExtJS 4 Button.js
(10.41 KiB) Downloaded 87 times
bizoo
 
Posts: 859
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Matching bracket limit ?

Postby iamntz on Tue Jul 12, 2011 6:38 am

I also noticed this issue with brackets:

http://screencast.com/t/6Gpe7XWEsx2g

The code is pretty small (like 50 lines or so), I don't think there is a full buffer issue.
iamntz
 
Posts: 819
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Matching bracket limit ?

Postby jps on Tue Jul 12, 2011 6:53 am

If the bracket matching isn't working for you, and it's not because of the character limit, please post some example code that demonstrates the issue, and indicate where in the code it's not working. I can't do anything with a video.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Matching bracket limit ?

Postby iamntz on Tue Jul 12, 2011 7:01 am

Oups, sorry about that. :mrgreen:
Here is the code http://iamntz.com/experiments/bracket.js.txt
iamntz
 
Posts: 819
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Matching bracket limit ?

Postby jps on Tue Jul 12, 2011 7:08 am

Thanks for the listing - all the brackets are matching correctly for me though.
jps
Site Admin
 
Posts: 3058
Joined: Wed Mar 19, 2008 12:33 pm

Re: Matching bracket limit ?

Postby iamntz on Tue Jul 12, 2011 7:13 am

Hmmm.. I think i just found the problem: "match_brackets_angle": true
If i set this to false, is working on me too.
iamntz
 
Posts: 819
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests

cron