Skip to content

feat(frontend): move/copy line shortcuts (Alt+Up/Down, Shift+Alt+Up/Down)#88

Merged
KrisPowers merged 1 commit into
masterfrom
feat/editor-move-copy-line
Jul 2, 2026
Merged

feat(frontend): move/copy line shortcuts (Alt+Up/Down, Shift+Alt+Up/Down)#88
KrisPowers merged 1 commit into
masterfrom
feat/editor-move-copy-line

Conversation

@KrisPowers

Copy link
Copy Markdown
Member

Summary

  • Implements Alt+Up / Alt+Down to move the current line (or selected block) up or down by swapping it with the adjacent line
  • Implements Shift+Alt+Up / Shift+Alt+Down to duplicate the current line or selected block above or below
  • All four operations work with multi-line selections, treating the entire touched line range as a unit
  • Cursor and selection anchor follow the moved/copied content in all cases
  • Each operation is a single backend edit call, so undo reverts it in one step
  • Wired up both as keyboard shortcuts in GpuEditor and as menu actions via the existing MenuBar command IDs

Closes #70

Test plan

  • Open a file, place cursor on any line
  • Alt+Up/Down: line swaps with the line above/below; cursor follows
  • Shift+Alt+Up: duplicate inserted above, cursor on original (now one line lower)
  • Shift+Alt+Down: duplicate inserted below, cursor stays on original
  • Select multiple lines and repeat all four; entire block moves/copies as a unit
  • Undo after each operation reverts in a single step
  • Edit > Move Line Up / Move Line Down / Copy Line Up / Copy Line Down menu items work

@KrisPowers KrisPowers changed the title feat(editor): move/copy line shortcuts (Alt+Up/Down, Shift+Alt+Up/Down) feat(frontend): move/copy line shortcuts (Alt+Up/Down, Shift+Alt+Up/Down) Jul 2, 2026
@KrisPowers KrisPowers merged commit 61f17d0 into master Jul 2, 2026
30 of 32 checks passed
@KrisPowers KrisPowers deleted the feat/editor-move-copy-line branch July 2, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor: Move Line and Copy Line keyboard shortcuts do nothing

1 participant