Incorrect Indentation when Pasting Text into Virtual Machine

Last reviewed: November 21, 1994
Article ID: Q82374
The information in this article applies to:
  • Microsoft Windows operating system versions 3.1, 3.11

SYMPTOMS

When you paste text into an MS-DOS text editor under Microsoft Windows, the text may be indented incorrectly.

For example, if you repeatedly paste " line 1" (without quotation marks) into a text editor running in an MS-DOS session under Windows, the text may appear as follows:

 line 1
  line 2
   line 3

CAUSE

This problem is caused by the editor.

This behavior is not an error with Windows, but a result of the editor's built-in feature that automatically indents when the ENTER key is pressed. If the text being pasted into the editor has a space or tab at the beginning of each line, this problem occurs.

When the carriage return from one line is pasted, the entry point is left directly under the first character from the previous line. Then the space or tab is pasted causing the incorrect results.

WORKAROUND

You can correct this problem by either modifying the text after it is pasted, cutting/copying the text in such a way so that the spaces or tabs are not present, or disabling the automatic-indent feature of the editor being run.


KBCategory: kbusage
KBSubcategory: win31
Additional reference words: 3.10 Pasting Paste text indent space 3.11
editor edit.com cut copy


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 21, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.