Workaround for line wrap?

General questions about using TextPad

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

Post Reply
HY

Workaround for line wrap?

Post by HY »

When I turn line wrap (or, actually, word wrap) on, Paddy will break up lines that are too long, but not in the middle of words. Fine. But then I discover that expressions inside single quotes are not broken either, even not between words. I have a 190-character long line with single quotes that's not being wrapped after character 116, which is the last character I see on my screen. Instead, it is broken at 179, which is the last whitespace character on that line. The characters 117 - 179 remain invisible, outside my screen, and the only way I may see them is by turning word wrap off (I may access them, though). This... bugish behaviour repeats itself in several lines.

I tried copying the whole sequence into a new document that has also word wrap turned on, and the line wrap worked like it should. But then I saved this new document, and suddenly, the odd behaviour was back.

I have figured out what was wrong. The problem is these two lines in the syntax definition file:
CharStart = '
CharEnd = '
This setting conflicts with the word wrap function. Does anyone know a workaround for this (so that I may keep word wrap turned on, keep single quotes as character markers, and still see the whole line)?

Regards,
HY
HY

Re: Workaround for line wrap?

Post by HY »

Being able to have more than one character on two other lines in the syntax definition file, i.e. like this:
StringStart = "'
StringEnd = "'
would be nice. I then could take the single quotes off the CharStart and CharEnd settings.

HY
Randall McDougall

Re: Workaround for line wrap?

Post by Randall McDougall »

Use:

StringAlt = '

instead of the charStart/End ... the Char settings are intended to delimit mnemonics for single characters only, hence the attempt to keep it all on one line ...
HY

Re: Workaround for line wrap?

Post by HY »

Thanks.

Do you also know how to make the escape backslash work outside quotes? I'm in the middle of a long perl script, and this line:
$curr =~ s/'/\"/g;
destroys all syntax highlighting because the first single quote is interpreted as a string start...

HY
Post Reply