CnPack Forum


 
Subject: Source highlight bugs and suggestions
nico42
新警察
Rank: 1



UID 37956
Digest Posts 0
Credits 12
Posts 3
点点分 12
Reading Access 10
Registered 2008-2-27
Status Offline
Post at 2008-6-23 19:42  Profile | Blog | P.M. 
Source highlight bugs and suggestions

Hi,

the new source highlighting enhancement is great! Thanks a lot for this, I love it!
However, I found a few small bugs:

  1. If the cursor is positioned on an "if" or "then" keyword an associated "else" is not highlighted.
  2. If the cursor is positioned on the first letter of a keyword (e.g. the "b" of "begin"), the keyword's background and it's corresponding counterpart's background are not highlighted.
  3. The "else" of a "case" clause is not highlighted.
  4. The "except" or "finally" keywords of an exception block are not highlighted.
  5. Highlight matching brackets seems to have no effect.
I use 0.8.4.397_Unstable Build 2008.06.22 with Delphi 2007.


A few suggestions:

If a code block like "if...then" or "for/while...do" is background highlighted, you optionally might want to include a following "begin/end" or "try/except/finally/end" in the background highlight. Although technically those are not part of the original block, it would greatly enhance the source highlight feature by showing the true extend of the block.

If the cursor resides over a procedure or function name you should optionally background highlight the "begin/asm...end" block of the procedure.

You should add more configuration options to the vertical line between the keywords. I would like to have them a little bit "thinner" (color-blended into the background color of the editor) or maybe dotted or dashed.

Keep up the good work!

Nico

[ Last edited by  nico42 at 2008-6-23 21:31 ]
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6814
Posts 3580
点点分 6814
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-6-24 08:56  Profile | Blog | P.M. 
Thanks for your suggestion. In fact, 1, 3, 4 are known bugs since this highlight function comes out. It comes from our "unreasonable" design and parsing, which will cause some trouble to reflectoring. We'll spend some time to do it once we have time.

About 2, it's a small bug, we can try to enhance it.
About 5, the bracket will be match when cursor is AT one bracket defaulty, not between them. Certainly, an options can be selected to highlight brackets when cursor is between them. Now it seems this option can not work in BDS.We'll check it.
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6814
Posts 3580
点点分 6814
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-6-24 09:15  Profile | Blog | P.M. 
In 397, the bracket match function of CnWizards is disabled. The highlight comes from BDS's own. It does not highlight bracket when cursor is between brackets.

We can try to enhance it to match when BETWEEN.
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6814
Posts 3580
点点分 6814
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-6-24 20:26  Profile | Blog | P.M. 
About 2,5, Please try 398?
Top
 




All times are GMT++8, the time now is 2024-10-10 07:03

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009598 second(s), 8 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP