Skip to content

fix(cli): review 진행표시 한글 폭(wcwidth) 절단 — 줄바꿈 스택 해결 (INT-1966)#147

Merged
unohee merged 1 commit into
mainfrom
fix/int-1966-display-width
Jun 26, 2026
Merged

fix(cli): review 진행표시 한글 폭(wcwidth) 절단 — 줄바꿈 스택 해결 (INT-1966)#147
unohee merged 1 commit into
mainfrom
fix/int-1966-display-width

Conversation

@unohee

@unohee unohee commented Jun 26, 2026

Copy link
Copy Markdown
Owner

재보고

한글 입력 시 진행표시가 여전히 줄마다 쌓임(스크린샷).

원인

이전 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.

후속 보고: 한글 입력 시 진행표시가 여전히 줄마다 쌓임. 원인은 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 후속(사용자 재보고).
@unohee unohee merged commit feac465 into main Jun 26, 2026
9 checks passed
@unohee unohee deleted the fix/int-1966-display-width branch June 26, 2026 23:17
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.

1 participant