Skip to content

Duplicate Line along with Multi-Cursor Selection places the cursors in the wrong column #2612

@cixtor

Description

@cixtor

Description

The “Duplicate Line” function places the cursor in the wrong column with a multi-line selection.

Steps to reproduce

  1. From the menu choose “File > New File”
  2. Type “lorem ipsum dolor”
  3. Hit “Cmd + Shift + D” four times to duplicate the line
  4. “Arrow Left” six times to place the cursor at then end of “ipsum”
  5. “Ctrl + Shift + Arrow Up” four times to create multiple selections
  6. “Cmd + D” to select all the “ipsum” words
  7. “Cmd + Shift + D” to duplicate the word “ipsum”
  8. Each line now has “lorem ipsumipsum dolor”
  9. “Arrow Right” to cancel the word selection
  10. Notice the position of the multiple cursors

duplicate

Expected behavior

After step ten (10) above, the multiple cursors should be in these columns:

Line 1, Column 17
Line 2, Column 17
Line 3, Column 17
Line 4, Column 17
Line 4, Column 17

Actual behavior

After step ten (1) above, the multiple cursors are placed in these columns:

Line 1, Column 17
Line 2, Column 12
Line 3, Column 7
Line 4, Column 2
Line 4, Column 20

Environment

  • Build: 3189
  • Operating system and version: macOS 10.14.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions