Recent

Author Topic: SynEdit. Why "fAttributes" mut be Sorted?  (Read 3364 times)

Edson

  • Hero Member
  • *****
  • Posts: 1302
SynEdit. Why "fAttributes" mut be Sorted?
« on: June 04, 2014, 08:19:07 pm »
On TSynCustomHighlighter.Create(), it is defined:

Code: [Select]
 
   fAttributes.Sorted := TRUE;

Is it necessary?. I mean: can I change it to:?

Code: [Select]
 
  fAttributes.Sorted := FALSE;
  ...

, without expect to  lose some functionality.

I'm trying to create dynamic attributes and I need, to have fixed the references on fAttributes.

Thanks
« Last Edit: June 04, 2014, 08:21:57 pm by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9908
  • Debugger - SynEdit - and more
    • wiki
Re: SynEdit. Why "fAttributes" mut be Sorted?
« Reply #1 on: June 04, 2014, 10:17:00 pm »
The setting seems to have been there for very long.

I can see no reason why it should be a problem / In fact I did not see a reason why they are sorted.

Maybe run an svn blame and see if it is something that is from the original SynEdit, or was added later (and if added later, then the commit should state why)

Edson

  • Hero Member
  • *****
  • Posts: 1302
Re: SynEdit. Why "fAttributes" mut be Sorted?
« Reply #2 on: June 05, 2014, 07:06:55 am »
Thanks Martin.

It seems it have been there for a log time. I've been checking on SourceForge.

Anyway, I'm trying to find other way for reference to the attributes.
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: SynEdit. Why "fAttributes" mut be Sorted?
« Reply #3 on: June 05, 2014, 09:00:44 am »
run an svn blame and see if it is something that is from the original SynEdit, or was added later (and if added later, then the commit should state why)
Have you tried this? It gives the revision number in which that line was implemented.
With svn log -r<revisionnumber> you get the commit message that goes with it... and with svn diff -r<revisionnumber-1>:<revisionnumber> you get the full diff/patch file of that commit.

Disclaimer: typed the svn commands by heart; they may be slightly incorrect.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018