test(terminal): 소프트랩 복사 진단 — 이미 정상, 회귀 테스트 추가#32
Merged
Conversation
소프트랩("줄내림")된 한 줄을 복사하면 wrap 지점마다 하드 개행이 끼어든다는
제보를 진단한 결과, 복사 경로는 이미 올바르게 동작함을 확인.
- Screen.selectionString / Surface.copySelectionToClipboards 둘 다
unwrap = true 로 호출 → 소프트랩 재결합 활성.
- formatter.zig wrap 로직(`if (!row.wrap or !self.opts.unwrap) blank_rows += 1;`)
도 정상: unwrap=true + row.wrap=true 이면 개행 미삽입.
- selectionString 필터 82/82 통과(신규 2건 포함), 코드 결함 재현 불가.
동작 변경 없음. 제보 시나리오를 못박는 회귀 테스트 2개만 추가:
- "selectionString soft wrap multi-row rejoin": 3-로우 소프트랩 한 줄이
개행 없이 ABCDEFGHIJKLMNO 로 재결합.
- "selectionString soft wrap then hard newline": 소프트랩은 재결합하되
실제 하드 개행 \n 은 보존.
원인은 사용자 텍스트의 실제 하드 개행 또는 타 터미널 설정으로 추정.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
진단 판정 (verdict): 코드는 이미 정상 — 동작 변경 없음
소프트랩(terminal auto-wrap · "줄내림")된 한 줄을 복사하면 wrap 지점마다 하드
개행이 끼어든다는 제보를 DIAGNOSE-FIRST 원칙으로 조사했습니다. 결론:
void 의 복사 경로는 이미 소프트랩을 한 줄로 재결합하며, 실제 하드 개행(
\n)만보존합니다. 코드 결함을 재현할 수 없었습니다.
근거 (증거 기반)
복사 경로 두 곳 모두
unwrap = true:src/terminal/Screen.zigselectionString(~2474):.unwrap = truesrc/Surface.zigcopySelectionToClipboards(~2224):.unwrap = true재결합 로직
src/terminal/formatter.zig(~1114):unwrap=true+row.wrap=true(소프트랩된 행) → 두 조건 모두 거짓 → 개행미삽입. 정상. 실제 하드 개행이 있는 행만
row.wrap=false이라 개행이 1개추가됩니다.
테스트 출력 (verbatim)
기존
\"Screen: selectionString soft wrap\"포함 전부 통과. 신규 회귀 테스트2건도 통과(82 = 기존 80 + 신규 2).
변경 사항
동작 변경 없음. 제보 시나리오를 못박는 회귀 테스트 2건만 추가
(
src/terminal/Screen.zig):\"Screen: selectionString soft wrap multi-row rejoin\"— 5-col 화면에 15자를써서 3개 visual row 로 소프트랩된 한 줄을 전체 선택 →
ABCDEFGHIJKLMNO(개행 미삽입) 기대.
\"Screen: selectionString soft wrap then hard newline\"— 소프트랩 한 줄 +실제
\n+ 다음 줄 → 소프트랩은 재결합, 하드 개행은 보존(
ABCDEFGHIJ\nKLM) 기대.CHANGELOG.md에 진단 결과를 정직하게 기록.추정 원인 (코드 외부)
void 복사 경로 자체는 올바르므로, 제보된 증상은 다음 중 하나로 추정됩니다:
(즉 복사가 실제로는 정확함).
clipboard-trim-trailing-spaces기본값true는 trailing 공백만 제거하며wrap 개행 삽입과 무관 — 원인 아님.
빌드 노트 (인프라)
zig build(인자 없이)는 현재build.zig.zon버전(0.0.0-void.1.4.1-dev)과HEAD 의 git tag
v1.4.1불일치로src/build/Config.zig:278에서 panic 합니다("tagged releases must be in vX.Y.Z format matching build.zig"). 이는 풀
라우팅 문제가 아니라 버전-스킴 mismatch 입니다(별도 pool 체크아웃 없음 —
/Users/mini/core는dancinlab심링크, 동일 inode). 빌드는-Dversion-string=1.4.1-dev로 우회하여 테스트했습니다. 빌드 파일은 다른에이전트 작업과 겹치므로 이 PR 에서 건드리지 않았습니다. 별도 추적 권장.
릴리스 필요 여부
불필요. 사용자-대면 동작 변경이 없으므로 v1.4.2 릴리스는 정당화되지
않습니다 (테스트/문서만 추가).
🤖 Generated with Claude Code