Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Unexpected whitespace insertion and/or cursor placement when creating new line #5068

@redmunds

Description

@redmunds

This behavior has caused me to have lines of code with unknown and undesired whitespace at the end. I finally realized what is happening...

  1. Find some indented code where there's an "empty" line, where "empty" line has whitespace to match the indentation of the code. For example:
        // last line of previous block of code

        // first line of next block of code
  1. Place cursor at start of "empty" line (i.e. column 0)
  2. Press Enter
  3. New line is added, cursor is moved to column 0 of new line.
  4. So far so good, now press Tab to indent code to match existing code
  5. Continue blissful coding...

Results:
After step 3, the code is already correctly indented, but cursor is placed a column 0, so there's whitespace after the cursor. Also, there is no longer whitespace on original empty line. Pressing Tab in step 5 doesn't move cursor to end of existing whitespace, it adds more whitespace!

Expected:
After step 3, I expect both lines to be indented, and cursor to be placed in column 8.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions