feat: Ctrl+E 지우기 커맨드 구현#822
Open
oksure wants to merge 2 commits into
Open
Conversation
- 선택 영역이 있으면 선택 삭제 - 선택 영역이 없으면 전방 1문자 삭제 (Delete 키와 동일) - shortcut-map에 Ctrl+E / Ctrl+ㄷ (한글 IME) 매핑 추가 - canExecute: () => false → (ctx) => ctx.hasDocument로 활성화
Contributor
There was a problem hiding this comment.
Pull request overview
편집 메뉴의 “지우기”(Ctrl+E) 커맨드를 실제 동작하도록 구현하고, 커맨드 시스템/단축키 매핑에 연결하는 변경입니다.
Changes:
edit:delete커맨드의canExecute/execute를 구현하여 InputHandler를 통해 삭제 동작을 수행하도록 추가- 커맨드 시스템에서 호출 가능한
InputHandler.performDelete()공개 메서드 추가 - 기본 단축키에
Ctrl+E및 한글 IME용Ctrl+ㄷ를edit:delete로 매핑 추가
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rhwp-studio/src/engine/input-handler.ts | 커맨드 시스템에서 호출할 삭제 동작 진입점(performDelete) 추가 |
| rhwp-studio/src/command/shortcut-map.ts | Ctrl+E/Ctrl+ㄷ → edit:delete 단축키 매핑 추가 |
| rhwp-studio/src/command/commands/edit.ts | edit:delete 커맨드 실행 가능 조건 및 실행 로직 구현 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2261
to
+2268
| /** 지우기 (커맨드 시스템용) — 선택 있으면 선택 삭제, 없으면 전방 1문자 삭제 */ | ||
| performDelete(): void { | ||
| if (this.cursor.hasSelection()) { | ||
| this.deleteSelection(); | ||
| } else { | ||
| const pos = this.cursor.getPosition(); | ||
| this.handleDelete(pos, this.cursor.isInCell()); | ||
| } |
Comment on lines
+18
to
+19
| [{ key: 'e', ctrl: true }, 'edit:delete'], | ||
| [{ key: 'ㄷ', ctrl: true }, 'edit:delete'], |
Copilot 리뷰 반영: - 그림/도형 개체 선택 상태에서 performDelete() 호출 시 개체 삭제 - shape/line/group은 deleteShapeControl, image는 deletePictureControl 사용 - exitPictureObjectSelectionAndAfterEdit()로 선택 모드 탈출
Contributor
Author
|
Copilot 리뷰 반영 (cd13f45):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
편집 메뉴의 "지우기"(Ctrl+E) 커맨드를 구현합니다. 기존 TODO 스텁을 실동작 코드로 대체합니다.
동작
변경 파일
commands/edit.tscanExecute: () => false→ctx.hasDocument,execute구현input-handler.tsperformDelete()공개 메서드 추가shortcut-map.tsCtrl+E/Ctrl+ㄷ(한글 IME) 매핑 추가감사합니다.