[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] StrongED 4.69b5 C mode bracket (mis)match freezing



In message <9e101f934850c84dde4fe624dd098aca.squirrel@xxxxxxxxxxxxxxxx>
          pdmiller@xxxxxxxxxxxxxxxxxx wrote:

> With Edit_MatchBrackets On I'm still encountering some short freezes when
> there is a bracket mismatch, either curly or round.

Thanks for reporting this.

> Admittedly, my C source file is a bit large - only about 49000 lines, but
> the freeze can be more than ten seconds for a round bracket mismatch when
> using StrongED 4.69b5 on my VRPC-AdjustSA (RISC OS 6.20) system.

That file quite a bit larger than the largest file I've tested with -
which was around 200k, 5000-ish lines. Is splitting up an option?

> The freezes occur during editing when adding a new left bracket or when
> moving the caret up or down the document passing through a line with a a
> mismatched left bracket (with the caret to the right of the bracket).

Perhaps part of the reason why I haven't seen this is that I always
enter both brackets at once and then move the caret back to write
whatever needs to go between them. This way there's less risk of
mismatched brackets. I do the same with string delimiters.
Maybe that's just me. :-)

> I am surmising here so you can correct me humanely, but it seems to me
> that the bracket match routine isn't stopping when it reaches the
> first line that is outside the visible window area (so there won't be a
> visible bracket to highlight), but just keeps on searching until it
> reaches the end of the document.

Correct. The code isn't just for highlighting brackets but also to go to
the matching bracket (Ctrl-B) and for selecting everything enclosed
(Ctrl-Shift-B). For this reason it cannot stop once outside the visible
area.

I have some ideas on making things faster such as bracket highlighting
being limited to what's visible only. This would however mean that you
won't be able to see if a bracket is mismatched or not when the matching
bracket is off screen.

I'll do some testing with 4.70a1 and if it's reasonable will back port
it to 4.69 but there's a chance you'll have to wait for 4.70a1 to get
this fixed - if at all.

Cheers,
Fred.

-- 
StrongED Developer
http://www.stronged.iconbar.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx