Syntax Highlighting Issue - 4.0

SyntaxEditor for Windows Forms Forum

Posted 13 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
Hi,

The very last word in a document is not coloring correctly unless you add a space or carriage return to the next line (by adding a new row).

Steps to reproduce:

* Start the SDI Editor Application
* Set the Language to VB.Net
* Line 22 - keyword Function is not colored

Appears to affect all languages ie. VBScript, JScript, SQL (the ones I checked anyway)


[Modified at 08/28/2006 06:07 PM]

Regards, Matt

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Matt,

Thanks for the post... we'll mark it down and check it out.


Actipro Software Support

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Found the problem... in v4.0 look-aheads and look-behinds now support zero-width assertions. In v3.1 they didn't. So in v3.1, we had look-aheads and look-behinds always return true if you were at the start or end of the document respectively. This is no longer true since we have correct behavior in v4.0.

So you need to change things like this:
LookAhead="{NonWordMacro}"

to this:
LookAhead="{NonWordMacro}|\z"

in the v4.0 dynamic language defs. That is saying match either a non-word character or the end of the document.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 10 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.