Why does Windows Vista's Notepad randomly move the cursor after saving a file?
I noticed this problem in Windows XP Notepad. It only happens if word wrap is on when you save. The amount the cursor moves back is related to the number of new wrap points before the cursor since the last save. The more new wrap points before the cursor, the further the cursor moves back.
Why does the cursor move? When you save with word wrap on, Notepad inserts CR CR LF characters at each wrap point in the display window (but not in the saved file). The number of characters from the beginning of the display window to the cursor stays the same, but because of the extra CR CR LF characters, the cursor appears to move backward.
For more information and a step-by-step example, see Notepad bug: Saving with word wrap on inserts CR CR LF characters in the display window.
Regardless of whether this is a bug, if you are doing anything in notepad regularly enough for this to be an issue, you need to start using a better text editor. Try the free notepad++ for a start - http://notepad-plus.sourceforge.net/