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

Bug 426408

Summary: "Matching bracket" annotation includes whitespace
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: EditorAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 5.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
screenshot none

Description Mark Macdonald CLA 2014-01-22 16:56:51 EST
Created attachment 239243 [details]
screenshot

1. Create a JS file by copy/pasting this code
> var t = function() {};
> 	t(
> 		"aaa",
> 		"bbb"
> 	);
2. Put the caret on line 2 after "t("
3. Type a space, then press Backspace to delete the space.

Since the caret is after a paren, we see the Matching Bracket annotation. However its range is not quite right: it includes the whitespace that precedes the matching ")" token.
Comment 1 Grant Gayed CLA 2014-02-05 11:15:39 EST
I used to see this type of problem semi-frequently, but I think it may have been fixed as a side effect of other off-by-1 fixes.  It doesn't happen with the comment 0 test case anymore, tried with Show Whitespace turned on and off.

Closing as WORKSFORME, please reopen if you see this happen again.