This is a follow up to bug http://bugs.freepascal.org/view.php?id=9652
 > In this line delete(str,1,pos('(',str)) the bracket in the string is 
highlighted instead of the opening bracket after pos

An unquoted bracket (which is meaningful source text in pascal) can be 
matched by a bracket in quotes (or other context such as comment). This 
prevents highlighting of the matching *functional* bracket.

Other related issues would be:
 ** comments:
( { ) } ) // will match the 1st and middle bracket, but for looking at 
it as pascal, the first and last are relevant

** concatenated strings:
b := '(' + foo + ')';
// OR
i:= 1; // 2 or 3
a := copy( '([{', i, 1 ) + 'some text in some bracket' + copy( '}])', 
4-i, 1 );
would be nice to also match the correct brackets in the strings.

That means finding matching brackets will need to be implemented inside 
the highlighter (or access the highlighter a lot). I would say in the 
highlighter as it allows bracket-pairs like begin/end

Opinions are welcome, but I can't say how much would go into a possible 
fix. Haven't look at the highlighter yet.

This also affect jumping and marking to the matching bracket.







_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to