[Lazarus] matching bracket problems (Carbon)

Martin Friebe lazarus at mfriebe.de
Fri Oct 10 16:00:42 CEST 2008


Well, I don't have a mac, so I can't test this, but I was involved into 
some refactor around the bracket-highlights (a few month back).

one of the major changes was
http://bugs.freepascal.org/view.php?id=11693 revision 15861
Did it work before that? Did/does it work in 0.9.24?

A few of the other work items were
http://bugs.freepascal.org/view.php?id=11732 revision 15845
http://bugs.freepascal.org/view.php?id=11754 revision 15883 (highlight 
bracket on either side of caret)

Anyway, a few things that may help to nail it down (even so I will not 
be able to do too much, since I have no mac...)

1) Do determine if it is an issue, with synedit thinking it needs to 
highlight a bracket, or is it an issue with Synedit not redrawing?

Do find out: When the highlight goes wrong:
 a) Bracket is highlighted, but the cursor moved away
 b) Bracket is not highlighted, but the cursor is on the bracket

resize the window, or overlap it with another window => anything that 
should force a redraw => does synedit correct the highlighting?

2) Fontsize issues (there is a good chance to find it here)

- Try highlighter = "none" or "text"   does that look any better?
- does it make a diff,if the caret is on the opening or closing bracket 
(the bracket occurring first on the line, or last?)
- does it make a diff if the 2 brackets are on the same line, or on 2 
different lines (especially with highlighter none/text ?

Synedit with highlighter, paints the line as a selection of small 
"tokens". It calculates the width of each of them. If the actual 
textdrawer gets a different width => all sort of strange things can happen.
That could explain an operating system dependent issue.


Martin



John Stoneham wrote:
>
>
> On Fri, Oct 10, 2008 at 4:17 AM, Mattias Gärtner 
> <nc-gaertnma at netcologne.de <mailto:nc-gaertnma at netcologne.de>> wrote:
>
>     Zitat von John Stoneham <captnjameskirk at gmail.com
>     <mailto:captnjameskirk at gmail.com>>:
>
>     > I've been using the latest svn (Carbon) for a while now,
>     updating once a day
>     > or so, and matching brackets never seem to highlight properly.
>     This issue
>     > appears on 10.4.11 and 10.5.3 (different builds for Tiger and
>     Leopard).
>     > Usually, they don't highlight at all. When they do highlight,
>     one or both
>     > often get "stuck" with the highlighting on after the cursor
>     moves away.
>
>     Some weeks ago I saw the same problem. It was the wrong font.
>     Since then it works almost nice, only sometimes the highlighting
>     is not updated.
>
>
> Well, this would be a major improvement over what I see all the time. 
> Thing is, I've tried all the fixed width fonts (Andale Mono, Courier, 
> Courier New, Monaco), and changing font doesn't have any effect. It 
> still doesn't work properly, ever. Which font are you using that's 
> causing the bracket highlighting to almost work? Actually, it'd be 
> better if you posted all your settings: the color scheme you use, 
> font, font size, whether anti-aliasing is enabled, and your settings 
> for matching brackets (e.g. bold, inverted, etc). Maybe they're some 
> "magic combination" and you've stumbled onto it.
>
> Perhaps you could attach your editoroptions.xml file?
>  
>
>
>     > Is anyone else noticing this issue? If so, I'll submit a bug report.
>
>     If you have some clues how to reproduce it reliable , yes please.
>
>
> It reproduces reliably for me, in that bracket highlighting never 
> works the way it's supposed to. However, it seems to be working 
> somewhat for you. If I can reproduce your settings and see the same 
> behaviour, then I'm sure you could reproduce mine and see what I'm 
> seeing. Then I'd say it's reproducable and I'll file a bug report.
>
> -- 
> _| ( ) |-| |\|
> ------------------------------------------------------------------------
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>   



More information about the Lazarus mailing list