Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 387584

Summary: Javascript bracket matching breaks if bracket is first character
Product: [ECD] Orion Reporter: Patrick Naish <patrick.naish>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: chris.whitty, Silenio_Quarti
Version: 0.5   
Target Milestone: 1.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Patrick Naish CLA 2012-08-20 07:39:10 EDT
Overview: 

If a file has no characters preceding a bracket (unlikely, but nonetheless), it will not highlight the first bracket when a second is added. The second is highlighted.

Steps to Reproduce:

1) Create a file, test.js.

2) Type "{ }".

3) Move between the start and end of the line. Note the second bracket gets highlighted as expected, but not the first.

4) Repeat for "( )", "[ ]", "< >".

Actual Results:

Only the second bracket is highlighted.

Expected Results:

Both brackets should be highlighted when appropriate.
Comment 1 Silenio Quarti CLA 2012-09-25 15:21:05 EDT
The problem happens because -0 == +0.

Fixed

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit?id=5cdac7e60793258c9a8a34ffaebb4a5d30364fea