Syntax Highlighting Fails For Numbers At Ends of Lines

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Art Metzer
Posts: 27
Joined: Mon Mar 06, 2006 5:31 pm

Syntax Highlighting Fails For Numbers At Ends of Lines

Post by Art Metzer »

In my syntax highlighting, I have numbers configured to appear in the color teal.
Link.

But numbers only feature their syntax highlighting if characters follow them in a line. Numbers at the very ends of lines are not being highlighted:
Link.

Seems like a bug.

Thanks,

Art.
User avatar
AmigoJack
Posts: 533
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Can't reproduce with 8.1.2. Either link to or post your syntax definition file in case you're using 8.1.2, too.

And we had this discussion almost exactly 1 year ago, where you also never responded.
Art Metzer
Posts: 27
Joined: Mon Mar 06, 2006 5:31 pm

Post by Art Metzer »

Yes, the syntax file iI'm using can be found here.

And I am using 8.1.2.

Thanks for taking a look.

Art
User avatar
AmigoJack
Posts: 533
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Seems to be "Syntax definitions for PL/SQL. Contributed by Douglas Crews. Updated by Charles Criss 10 August 2001" which you manually augmented, but which was surely meant to be working only with older versions of TextPad, not recent ones (without using new attributes).

Use Updated syntax definitions for PL/SQL. Originally contributed by Douglas Crews. Contributed by Clark Pearson, 18 August 2012 as with this I can have colored numbers at the end of the line.
Art Metzer
Posts: 27
Joined: Mon Mar 06, 2006 5:31 pm

Post by Art Metzer »

No change in behavior for me, even when specifying the 2012 syntax file.

Odd.
User avatar
AmigoJack
Posts: 533
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

You have to restart TextPad after setting up a new document class or changing one of its syntax definition files. Also sure you're using that very document class (if your file has the name extension ".sql" then does really only that one document class have *.sql as "Files in class")?
Art Metzer
Posts: 27
Joined: Mon Mar 06, 2006 5:31 pm

Post by Art Metzer »

The issue persists for me, even after re-starting TextPad.

I have confirmed that the affected file extensions are not defined under any other document class in TextPad.

I am skeptical that the syntax file itself (plsql.syn) is the source of the issue, since nowhere in that file do I see a place where the definition of "number" is explicitly coded.

Moreover, the issue for me is not restricted to just SQL files. For example, I also have a Java document class defined, and the same issue exists in my Java files: digits at the ends of lines are not syntax-highlighted.

I wonder if there might be an option in the Document Class Options that might be causing this behavior?

Here's what I have checked in my PL/SQL document class:

[X] Maintain indentation
[X] Strip trailing spaces from lines when saving

(All other checkboxes remain unchecked.)

For the radio-button options:

Word wrapped text: Save with no breaks in lines
Default encoding: ANSI
Create new files as: UNIX

Thanks for your help.
User avatar
AmigoJack
Posts: 533
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

If you have this in other files (to which other syntax highlighting applies) then that syntax definition (not your color settings for "numbers") apply. How about trying this with every document class, instead of only your PL/SQL and Java classes?

As said before: I'm unable to reproduce this. Also not for Java files, using the syntax definition "Copyright (C) 1998-2000, Helios Software Solutions", file date 2000-07-14.

So if we use the same TextPad version and the same syntax files then there's still something different. Settings should not affect syntax definitions (indention maintenance, trimming lines, colors being used...).

The syntax file can be the issue, as more recent TextPad versions understand more definitions/codes than older did, hence different syntax definition versions can have a different outcome (i.e. "StringsSpanLines" and "SingleCommentColAlt" sound like they were not available since i.e. 6.0.0 already).



A good test would be installing/unpacking TextPad from fresh to see how they highlight your Java file with numbers at the end of a line.
Post Reply