Syntax highlighting acting strange in 4.4.x

General questions about using TextPad

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

Post Reply
James Treworgy

Syntax highlighting acting strange in 4.4.x

Post by James Treworgy »

After an OS upgrade I reinstalled Textpad and added my usual PHP document class with *.PHP and *.PHP3. However, I forgot to remove *.PHP from HTML class and for whatever reason told TextPad I didn't care. Then I went back afterwards and removed it from the HTML document class, so PHP was the only class containing *.PHP and *.PHP3

Now, everything is really screwy. I can't get the PHP class to work at all. *.PHP files are being syntaxed as HTML, even though PHP no longer exists in the HTML class. *.PHP3 files are not doing anything. Then, I completely DISABLED syntax highlighting for both document classes (HTML and PHP) and yet PHP files are still being highlighted as HTML!!

I had been running 4.4.0 at the time. I upgraded to 4.4.1, and the result is still the same.

It seems like the sequence of events I performed caused TextPad's internal configuration to get really wacky. I suppose I will try uninstalling and reinstalling from scratch, but this appears to be a bug that might happen if you ignore Textpad's warning and temporarily allow two document classes to share a suffix.

-- Jamie
James Treworgy

Re: Syntax highlighting acting strange in 4.4.x

Post by James Treworgy »

De-installed and reinstalled. This time removed PHP from HTML, then added document class. Still screwed up! *.PHP file show as HTML, and can't get anything to format as PHP.
James Treworgy

An anwswer..

Post by James Treworgy »

OK, it seems to be related to workspaces. That is, I had been reloading a workspace each time, rather than an individual file. When I recreated the workspace by loading each file individually things were back to normal.

I think what is happening is that when the workspace is created, it is storing whatever syntax highlighting info was set at the time as part of the class. The problem is, making changes to the universal document class settings have no effect on the document class thereafter. Perhaps this is by design, but it seems rather confusing. I can't find any way to "reapply" document class settings to a workspace after they've been changed.

-- Jamie
Post Reply