Skip to content

Duplicate line does not work correctly on first line of document or on blank second line #1136

@jeremypw

Description

@jeremypw

What Happened?

Trying to duplicate the first line of a document using the shortcut <Ctrl>D failed. When the second line contained text it was duplicated. If the second line was blank then both it and the third line was duplicated.

Steps to Reproduce

  1. Create a new document containing just the line number on each line (1,2,3,4 ...).
  2. Place the cursor on line 1 and press <Ctrl>D
  3. Observe that the document now contains five lines with two lines with "2" (1,2,2,3,4 ...)
  4. Create a similar document containing a blank second line (1, _, 2,3,4, ...)
  5. Place the cursor on line 1 and press <Ctrl>D
  6. Observe both 2nd and 3rd line duplicated (1, _, 2, _,2,3,4)

Expected Behavior

Only the line on which the cursor is place is duplicated.

OS Version

6.x (Odin)

Software Version

Compiled from git

Log Output

No response

Hardware Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions