Community
Participate
Working Groups
if (1 < 2) System.out.println("hi"); highlighted brackets: --------------------- - put caret before first '(' enclosing block - Shift+ArrowRight (1 < 2) - Shift+ArrowRight (1 < 2) - Shift+ArrowDown enclosing block - Shift+ArrowUp enclosing block => we have different highlights for the same selection depending on the selection change sequence
The latest patch in comment 372516 improves this but there's still an issue when expanding the selection into the bracket: it starts to select the enclosing braces instead of staying inside the ( ).
(In reply to comment #0) > if (1 < 2) > System.out.println("hi"); > > highlighted brackets: > --------------------- > - put caret before first '(' enclosing block > - Shift+ArrowRight (1 < 2) > - Shift+ArrowRight (1 < 2) Selection is '(1' and ( ) are highlighted because the avoid-computation logic thinks there is no need to recompute in this case. > - Shift+ArrowDown enclosing block > - Shift+ArrowUp enclosing block Selection is '(1' and { } are highlighted and a computation happens which finds { } as the enclosing brackets. > => we have different highlights for the same selection depending on the > selection change sequence The fix from bug 372516 causes the computation to happen in both the above cases and hence { } are highlighted all the time...
Created attachment 214685 [details] fix I still think that the existing behavior is better and that { } should be highlighted here, but since I am outnumbered here is the fix. All current tests pass but I will probably add some more tests later today.
Thanks Deepak. Fix pushed to master: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=ceab3c0e6320d35d3ac67512bbe480c3a742341a