Skip to content

Move Line Up/Down incorrectly moves the line below selected line(s) #3131

@jzniu

Description

@jzniu

Environment

  • TeXstudio: 4.5.2
  • Qt: Qt6
  • OS: Windows10
  • TeX distribution: miktex

Expected behavior

Select one or multiple lines (from start of line N to start of line N+m), then use Move Line Up/Down to move the selected line(s) up and down. Only those selected lines (line N to line N+m-1 exactly, inclusive at both ends) move, not including line N+m.

Actual behavior

Line N+m moves along as well.

If the selection ends at the end of line N+m-1, then line N+m doesn't move along. It seems that the EOL character in line N+m-1 leads to the inclusion of line N+m. This may relate to the way of implementation regarding how many lines are considered.

Popular text editors, such as vscode, behave consistently regardless whether the EOL is included or not.

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