fix(cli): review 진행표시 한글 폭(wcwidth) 절단 — 줄바꿈 스택 해결 (INT-1966)#147
Merged
Conversation
후속 보고: 한글 입력 시 진행표시가 여전히 줄마다 쌓임. 원인은 truncateLine이 문자열 길이(코드유닛)로 잘라, 한글(2칸 폭)이 터미널 너비를 넘겨 wrap → \r\x1b[2K가 마지막 줄만 지워 윗줄이 누적. - displayWidth(s): East-Asian wide/fullwidth(Hangul/CJK/kana/fullwidth)·emoji를 2칸으로 계산. - truncateLine: 코드유닛이 아닌 **표시 컬럼 예산**으로 절단(말줄임 1칸 예약). - startReviewProgress: maxCols = columns-1(마지막 칸 auto-wrap 방지). 테스트: displayWidth(한글/emoji=2) + 한글 truncate(폭 기준) + 멀티라인 한글 노트가 columns 내 단일 라인 유지. 전체 green. INT-1966 후속(사용자 재보고).
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.
재보고
한글 입력 시 진행표시가 여전히 줄마다 쌓임(스크린샷).
원인
이전
truncateLine이 **문자열 길이(코드유닛)**로 잘라, 한글은 2칸 폭이라 실제 표시폭이 터미널 너비를 초과 → wrap →\r\x1b[2K가 마지막 줄만 지워 윗줄 누적.변경
displayWidth(s): Hangul/CJK/kana/fullwidth·emoji를 2칸으로 계산(wcwidth-lite).truncateLine: 코드유닛이 아닌 표시 컬럼 예산으로 절단(말줄임 1칸 예약).startReviewProgress:maxCols = columns-1(마지막 칸 auto-wrap 방지).검증
displayWidth(한글/emoji=2) + 한글 truncate(폭 기준) + 멀티라인 한글 노트가 columns 내 단일 라인. tsc/build clean, 전체 1157 green.