Extra blank line - is it a bug?

General questions about using TextPad

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

Rudy Penteado
Posts: 3
Joined: Sat Jan 10, 2004 12:52 am

Extra blank line - is it a bug?

Post by Rudy Penteado »

My TextPad Editor is configured like:
General: Nothing..
File: Override original files.. Prompt.. & the lower 2 options..
Editor: Constrain cursor.. TextPad.. Show keyboard shortcuts..
View: Block.. Full path.. Popup names.. Popup tips.. Vert.scroll bar..
DocClasses (all): Nothing but ANSI & PC..
Win XP in use.

Since I changed to 4.7.2, I am having problems with the generation
of extra blank lines that are not visible during the entry. Explaining
better: When I am editing a file the screen looks OK but after the file
is saved and retrieved again, some lines show an extra blank line
that didn't exist in the original screen during the editing.
After struggling for weeks with this problem I finally found a way to
duplicate it and discovered a curious associated behavior in TextPad.

How to duplicate:
Place the cursor at the first position in a line (in a group of lines that
doesn't have extra blank lines).
Enter one and only one character (any). Press Enter.
You get a line containing the single character that you entered and no
extra blank lines.
Save the file and re-open it again. An extra blank line shows up now,
right after the line that contains the single character.
An exam of the file in hex shows that TextPad put 2 line feeds after
the single character instead of a carriage return and a line feed.

If you enter two characters instead of only one, the line termination is
OK, with carriage return and line feed as it should.
Is this a bug or am I doing something wrong? May I have some help
from you guys, please?

Best regards, Rudy.
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

I've repeated the steps with the options given but I get no blank line.
I'm using Windows 2000
Rudy Penteado
Posts: 3
Joined: Sat Jan 10, 2004 12:52 am

I tried again

Post by Rudy Penteado »

Ed,
Thanks for testing. I got puzzled by your answer and drove to a close friend that has a W2K box and doesn’t have TextPad. I took the txpeng472.exe, 1,951,617 bytes, CRC32 4E8D0621, with me and installed it in his box. I then fired it without changing any configuration and did the test in there. I got the same results I had in my WXP box. Same error, same circumstances.
Maybe you forgot any small detail or I was not very explicit about the scenario.
Again:
Put the editor in the insert mode. Position the cursor at the very beginning of a line that doesn’t have a blank like before it.
Press the letter x and press Enter immediately after.
You will get a single line with the character x only, above the line you were before and still are now. You won’t see any extra blank lines.
Save the file and quit TextPad. Start TextPad again and open the file. Look at the x alone line and see that it now has a blank line after it.
Thanks, Rudy.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Just did this procedure and also get an extra line.
Also tested with word wrap on and off, and with automatically terminate
the last line of the file on and off. Same result. TP 4.7.2 - WinXPsp1.
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

W2k, SP4ish, TP 4.7.1
Opened a new document
Typed x, Return
Saved \tmp\test.txt
Closed TP
Opened TP
Opened \tmp\test.txt
Visible contents of file: x\n
Hex view is identitcal: 78 0D 0A
I choose to fight with a sack of angry cats.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Try with some data.
Btw, I get the same result for an empty file, in hex view 78 0D 0A.
original code:

Code: Select all

line 1
line 2
x at start of line, followed by enter:

Code: Select all

line 1
x
line 2
becomes this when opend again in TP:

Code: Select all

line 1
x

line 2
Edit: I have reported this on the feedback page, along with other possibles:
Select text from wrapped line
Increase Indent, or TAB, respecting my intentation (long)
Edit 2: Here are the hex values of my file, the entire string is
6C696E6520310D0A780A0A6C696E6520320D0A and it looks like this

Code: Select all

6C696E6520310D0A
780A
0A
6C696E6520320D0A
Last edited by s_reynisson on Sun Jan 11, 2004 4:48 pm, edited 1 time in total.
Then I open up and see
the person fumbling here is me
a different way to be
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Just an idea.

What is your setting under
Configure - Preferences - Document Classes - >your document class< - Create new files as
?

And what do you select under "File format" when saving the file?
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

In my case it's:
Configure - Preferences - Document Classes - Text - Create new files as PC
Save As dialog:
File name: Document1.txt
Save as type: All Files(*.*)
File format: PC
Encoding: ANSI
Then I open up and see
the person fumbling here is me
a different way to be
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

Win2k SP4

I've tried several more times and have not been able to reproduce the problem. It was set to default as unix - but I've changed that
kim1
Posts: 3
Joined: Mon Jan 12, 2004 1:35 am

Post by kim1 »

Confirming bug in 4.7.2 on WinMe on following Rudy's instructions.
Thomas Schremser

Post by Thomas Schremser »

I can reproduce this behaviour. But my hex view differs: for the entered line break after the single character it has 0x0A 0x0A instead of 0x0D 0x0A. Thats why this single line break is displayed as two.
ChipJust
Posts: 3
Joined: Thu Jan 08, 2004 6:06 pm
Location: Austin, TX

Related to Paragraph feature

Post by ChipJust »

I found this problem independantly.

It seems that textpad is marking paragraphs now. When I use a compare utility (Beyond Compare) to compare the previous version of the file to the modified version I see that under some circumstances TextPad is inserting some kind of paragraph marker. Then if I try to merge two groups, it will look like they are together until I restart TextPad.

This is very annoying, as all my line numbers are off until I restart Textpad. Furthermore my code groupings are all messed up.

I hope we can get an option to turn this paragraph "feature" off soon; otherwise I will have to find some earlier version that doesn't have it.


-chip
Rudy Penteado
Posts: 3
Joined: Sat Jan 10, 2004 12:52 am

Thanks

Post by Rudy Penteado »

I would like to thank everybody for examining the subject, specially 's_reynisson' and 'kim1' for being able to reproduce it. I am convinced now that this is a bug and we have to wait for the next release to have it fixed.

Thomas, those 2 lines are in my very first posting of this problem:
"An exam of the file in hex shows that TextPad put 2 line feeds after
the single character instead of a carriage return and a line feed."

Best, Rudy.
Thomas Schremser

Re: Thanks

Post by Thomas Schremser »

Rudy Penteado wrote:Thomas, those 2 lines are in my very first posting of this problem:
"An exam of the file in hex shows that TextPad put 2 line feeds after
the single character instead of a carriage return and a line feed."
Oops! I missed that. :oops:
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

:oops: Iwas using :oops: TP 4.7.1. I DO get the problem with v4.7.2
Post Reply