You'll find details of the bug there, but basically, if you enter a line the
wraps then save the file, line break characters will be added and the line
will no longer be one wrapped line. It will be multiple lines. Copying and
pasting what had been a single line will cause it to be truncated when
pasted, for example, in a browser address bar. Copying and pasting commands
that had these line breaks added will break the command when pasted at the
command line. I can't use Notepad anymore.
I cannot see any evidence of a bug that causes line breaks to be added.
If you think that they exist then I suggest you post a step-by-step
recipe that others can follow to confirm (or otherwise) your suspicon.
Don't rely on someone else's unconformed reports - try it for yourself,
then show us!
To reproduce it:
1. Open http://www.polisource.com/misc/notepad-bug.txt in Notepad, with
"word wrap" checked, when the Notepad window isn't full-screen size (mine is
about half the size of my monitor), then maximize Notepad so it's full-screen
size and you'll see the text spread out to fit the width of the screen. (this
step is just to show that the line is a single line that wraps as such).
2. Make the screen smaller again and save the file, then maximize again, and
you'll see that the text won't be spread out.
This shows that the document on the screen changes when it's saved. Line
breaks are added.
I tried to follow your recipe as closely as I could even though you
omitted some essential details, e.g. when LineWrap should be
turned on and when it should be turned off, or when the file should
be saved/closed/reopened. I left LineWrap on at all times.
I was unable to reproduce your findings. Each time I expanded
the width of the screen the lines expanded to whatever the
current window could accommodate.
Your conclusion "This shows that the document on the screen
changes when it's saved. Line breaks are added." lacks
substance. To demonstrate that line breaks are added, you need
to examine the file with a binary viewer / editor. If you don't
have one, use debug.exe. I checked the file with such an editor -
there were no extra line breaks added.
Lastly it is highly speculative to suggest a bug when you base
your conclusion on an observation on one single machine. You
should test your theory at the very least on two completely
independent machines but preferably on three or four. For
all we know, it might be your own machine that has a bug, not
notepad.exe.
Bill
Your report suggests that the ***visual*** line breaks may be
repositioned after the notepad window is resized. The OP's
claim that line breaks are inserted into the file must have been
based on this observation only rather than on a close examination
of the file itself.
I've tried copying text from Notepad after saving the file and noticed the
full line couldn't be pasted in IE's address bar because it was truncated at
the line breaks that Notepad added. I've also tried copying commands and
pasting them in a console window and they appeared as more than one line and
didn't function as commands.
Well, duh!
You're not copying the FILE to the clipboard, you're copying what's
displayed on Notepad's screen. The screen has line breaks (else you'd have
to scroll all over the place).
That's something completely different than what you posted
in your previous "step-by-step" procedure. When chasing
bugs you need to be
a) consistent and
b) comprehensive
I can't detect much of either in your notes.
You have an attitude problem. You should go away.
That is merely a formatting issue regarding line-wrap mode. When you
reduce the size of the window, Notepad breaks the long line at word
boundaries. When you maximize the window, Notepad doesn't know how to
repaste the lines back together - but that is ONLY in its *view*
inside the window. When you maximize but the word wrap doesn't
repaste the lines together, save the file while it looks like the
lines are truncated. Two things happen: as soon as you do the save,
Notepad displays the saved file and word wrapping uses the full width
of each line in the maximized window; and, when you open the saved
file, you'll see there was no truncation.
Notepad knows how to perform line wrapping when the window is reduced
in size. It doesn't know how to do UNWRAPPING when the window is
enlarged. Notepad is not a WYSIWYG editor with all of those features.
Don't expect line wrapping to magically UNWRAP a line when you enlarge
a view of a document by increasing the window size in Notepad. No
linebreaks got added to the saved file. Just because YOU see
whitespace inside of Notepad's window doesn't mean it is there in the
file.
Just turn off word wrap and turn it back on. Voila, now the line that
got elongated in the 1-line view with word wrap off will get
automatically parsed when you turn word wrap back on. Notepad only
does line wrapping when the window is reduced in size if a view has
been captured, like when doing the save. It tries to do the line
wrapping otherwise but it is JUST A SIMPLE PLAIN-TEXT EDITOR, not a
word processor.
There are other text file editors that do better on the line wrapping.
Some even add so many features that eventually they become more like
word processing programs. Some are just very potent text editors,
like VIM. Of course, if all you want is a very simple line editor,
you could use edlin.exe. It still exists (well, up to Windows XP).
I agree, I have an attitude problem when I encounter a bug chaser
with an unsystematic and inconsistent approach.
> Just turn off word wrap and turn it back on. Voila, now the line that
> got elongated in the 1-line view with word wrap off will get
> automatically parsed when you turn word wrap back on.
Good, then Microsoft should be able to fix the bug easily by implementing
the toggle programmatically. It should be in the next Windows update.
Guess you missed the point that Notepad is not a WYSIWYG word
processor. Have you seen Microsoft modify edlin.exe for the
console-mode text editor in 15 years, or more?
Since the content of the saved file is ignorant to any of your choices
regarding the *display* of wrapped lines, the program is successfully
and properly editing the files. It is a text editor. That's it. If
you want something more, go use some 3rd party editor. There are LOTS
of them, like VIM, and a great number of them are free, like VIM (also
called gvim).
Or choose to be obstinate and continue using a product that edits the
file correctly but doesn't do just what YOU want regarding unwrapping
of lines which is irrelevant in plain-text files, anyway.
I followed your instructions and although it fails to expand to fill the
screen. If you close notepad and then reopen the saved file, it expands to
fill the width if changed, thus showing that no linebreaks were saved.
No, you are missing the point. Notepad doesn't add anything to the test
file that it saves. The only line breaks in the saved fiel are the ones
that you specifically add when entering text.
Microsoft don't need to fix it, 'cause it ain't broken.
The line breaks seem to be temporary because they can be cancelled by
deselecting wordwrap and then selecting it again. The whole line can then
be cut and pasted without any problems.
I think you're wasting your time. Barry is on a mission: He believes
that he has found a bug and he will not rest until everyone agrees
with him that Microsoft is doing a lousy job by not fixing it for him.
There is no point in confusing him with facts.
> I followed your instructions and although it fails to expand to fill the
> screen. If you close notepad and then reopen the saved file, it expands to
> fill the width if changed, thus showing that no line breaks were saved.
That is because Barry "jumped the gun", no hard returns are added to the
file, the file is absolutely unchanged. What is happening is that the
WYSIWYG word wrap has a hiccup, Barry could have figured that out by
simply re-wrapping the text.
The subject header that Barry chose "Notepad bug makes it unusable" is
rather amusing, it doesn't make Notepad unusable, but to give credit to
Barry it could be classed as a bug, but only a minor bug, not one that
makes Notepad unusable. Notepad is still a supported product, over the
years it has had several revisions and changes made to it. Notepad
ships with all Windows versions and being that XP is still supported
Microsoft should address the issue. A lot of people copy from Notepad
to other applications and I can see where this issue could cause
problems for those who are unaware of this Notepad peculiarity.
I vote that this is a minor Notepad bug that Microsoft should fix.
Barry should file a bug report: http://support.microsoft.com/gp/contactbug/
John
Notepad is so unusable for me that I wasn't trying to figure if the same
goes for most people. I use Notepad to save helpful command prompt commands
and for links with associated notes. For example, I may have a link to a
website and to my local copy of it and a excerpt from it, then a line of
hyphens and another similar entry. I'll update it once in a while, save it,
and want to copy one of the links to the address bar and find it's truncated.
Sorry, I'm an alien from Alpha Centauri so I don't qualify as Earth
"people". I have yet to be bothered by this visual-only artifact.
I have worked at several computer-industry companies (hardware or
software producers) with lots of developer and QA folks and never
heard anyone there complain about this artifact. They must all be
aliens, too.
Stop confusing what is the OS that you purchase and all the fluffware
that comes included with it. Nowadays even the Linux distros come
riddled with fluffware, too.
I have to admit, that I was starting to wonder if the OP was some kind of
troll.