Syntax highlighting fails if search jumps to middle of file

General questions about using TextPad

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

Post Reply
wstein
Posts: 3
Joined: Wed Feb 15, 2012 1:00 am

Syntax highlighting fails if search jumps to middle of file

Post by wstein »

I "launch" a textpad workspace file which automatically opens about a hundred files (my entire project).

Then, if I click on a document in the document selector, and search on a string that makes me jump way down into the file, the syntax highlighting does not work. Comments are highlighted green, but no other syntax is highlighted.

If I then go to the top of the file (Ctrl+Home), and use PgDn to scroll all the way through the file, the syntax highlighting works the whole time as I move through the file. At this point, using search to jump anywhere in the file does not produce the problem... syntax highlighting works fine.

On the other hand, if I instead press Ctrl+Home to go to the top, and then Ctrl+End to go directly to the end of the file, syntax highlighting still does not work... only comments are highlighted green.

If I open Textpad normally (not using the workspace) and open the same file that just had the problem, and try to reproduce the problem with just the one file, it has no problem... when search jumps directly to the middle of the file, syntax highlighting is fine.

I'm using Textpad v5.4.2 and I've noticed this frequently when using my slightly customized drupal.syn syntax highlighting file, though I think I've seen it also with my customized php.syn file, too:
http://aasports.net/temp/drupal.syn
http://aasports.net/temp/php.syn

How can I fix this problem? Is there something wrong with the .syn files?
It certainly seems like a TextPad bug since the syntax highlighting failure only happens when search jumps to the middle of the file.
Post Reply