feat: 모양 복사/붙이기 (Ctrl+Alt+C/V) 구현#828
Open
oksure wants to merge 2 commits into
Open
Conversation
- edit:format-copy 커맨드: 커서 위치의 글자/문단 서식 캡처 - edit:format-paste 커맨드: 캡처된 서식을 선택 영역에 적용 - Ctrl+Alt+C / Ctrl+Alt+V 단축키 등록 (한글 IME 포함) - 내부 ID(charShapeId, paraShapeId 등) 제외하고 시각 속성만 복사
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “모양 복사/붙이기” 기능을 커맨드/단축키 체계에 연결해, 커서 위치의 서식(글자/문단)을 캡처한 뒤 선택 영역에 적용할 수 있도록 확장하는 PR입니다.
Changes:
InputHandler에 서식 클립보드 저장/적용 로직(performFormatCopy/performFormatPaste/hasFormatClipboard) 추가edit:format-copyTODO 구현 및edit:format-paste커맨드 신규 추가- Ctrl+Alt+C/V 및 한글 IME(ㅊ/ㅍ) 단축키 매핑 추가
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| rhwp-studio/src/engine/input-handler.ts | 서식 캡처/적용을 위한 내부 클립보드 및 적용 메서드 추가 |
| rhwp-studio/src/command/commands/edit.ts | 모양 복사/붙이기 커맨드 구현 및 등록 |
| rhwp-studio/src/command/shortcut-map.ts | Ctrl+Alt+C/V 및 ㅊ/ㅍ 단축키 등록 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2440
to
+2441
| const { charShapeId, fontId, fontIds, paraShapeId, ...charRest } = charProps as any; | ||
| const { paraShapeId: _psId, ...paraRest } = paraProps as any; |
Comment on lines
+2440
to
+2441
| const { charShapeId, fontId, fontIds, paraShapeId, ...charRest } = charProps as any; | ||
| const { paraShapeId: _psId, ...paraRest } = paraProps as any; |
Comment on lines
+2445
to
+2451
| performFormatPaste(): void { | ||
| if (!this.formatClipboard) return; | ||
| if (!this.cursor.hasSelection()) return; | ||
| const sel = this.cursor.getSelectionOrdered(); | ||
| if (!sel) return; | ||
| this.applyCharPropsToRange(sel.start, sel.end, this.formatClipboard.char); | ||
| this.applyParaPropsToRange(sel.start, sel.end, this.formatClipboard.para); |
| { | ||
| id: 'edit:format-paste', | ||
| label: '모양 붙이기', | ||
| icon: 'icon-format-paste', |
- as any 제거, Partial<CharProperties> 타입으로 구조 분해 - borderFillId, numberingId도 복사 대상에서 제외 - icon-format-paste → icon-format-copy 재사용 (CSS 스프라이트 미등록)
Contributor
Author
|
Copilot 리뷰 반영 (06fd552): as any 제거 + borderFillId/numberingId 제외 추가 + icon-format-paste → icon-format-copy 재사용 |
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.
변경 내용
edit:format-copyTODO 스텁을 구현하고, 대응하는edit:format-paste커맨드를 추가합니다.구현 사항
변경 파일
input-handler.tsperformFormatCopy(),performFormatPaste(),hasFormatClipboard()추가edit.tsedit:format-copy구현 +edit:format-paste커맨드 추가shortcut-map.ts테스트
cargo test통과cargo clippy -- -D warnings경고 없음감사합니다.