Joining Lines Bug

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
AlexW
Posts: 2
Joined: Sat Aug 23, 2003 12:08 pm

Joining Lines Bug

Post by AlexW »

I've noticed a minor problem whereby I keep getting newlines added to the end of text files after I've been editing them.

I've narrowed down the problem and here's how you should be able to reproduce it:

I've set lines to wrap at 76 characters, and "save with hard breaks" is set. With the following two lines of text in my document:

Code: Select all

If you have any questions (and, ideally, answers) you can contribute, please
reply to the newsgroup or email someone@somewhere.com.
If I delete the linebreak after the word "please", then hit Enter after the word "please" to put it back, then select both lines and hit Ctrl+J to join lines, then save the file, an extra linebreak is added to the end of the text file, even though these lines appear well before the end.

This has happened in a number of different documents, and after making several changes to them over time I always notice there are extra line breaks dangling at the end of the file. It's not much of a problem to delete them but it seems odd to me how they got there. I've just upgrade to version 4.7 and the problem still exists.
User avatar
bbadmin
Site Admin
Posts: 1038
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

I've not been able to reproduce this problem, but I have edited your message to remove your email address. If you'd been getting 100 Sobig.F generated messages per minute, like our support email currently is, you would know why!

On Configure/Preferences/Editor, try unchecking "Automatically terminate the last line of the file".

Keith MacDonald
Helios Software Solutions
AlexW
Posts: 2
Joined: Sat Aug 23, 2003 12:08 pm

Post by AlexW »

That option was unchecked already.

Trying to narrow this down further, it seems all I have to do is delete any line break between word-wrapped lines, and then save. After the file is saved, an extra line break appears at the bottom. This is with the option to save with hard breaks, so before I save the file looks like this (with visible spaces):

Blah-blah-blah-blah-
blah-blah-blahd

(they're dots rather than dashes, and the "d" is the line break character)

After I save it looks like

Blah-blah-blah-blahd
blah-blah-blahd
d

It doesn't happen if I delete a line break which isn't wrapping a line (e.g. if I delete that final line break in the example above).

Hopefully this makes some sort of sense. I can provide screenshots if that will help.
Post Reply