fix(desktop): prevent Korean character swallowing in terminal and xterm.js surfaces (INPUT-04, INPUT-19)
This commit is contained in:
parent
f18cebaa24
commit
61123b5ad8
11 changed files with 264 additions and 50 deletions
|
|
@ -329,6 +329,31 @@ describe('terminal prompt extraction', () => {
|
|||
expect(tracker.vimMode).toBeNull()
|
||||
expect(tracker.currentPrefix()).toBe('햣')
|
||||
})
|
||||
|
||||
it('키다운마다 koreanIme 를 넘기지 않아도 유휴 스냅샷에서 syncKoreanIme(true) 로 미치환 영문 꼬리를 한글로 복원한다', () => {
|
||||
const tracker = new TerminalKeystrokeTracker()
|
||||
const hwnd = 9901
|
||||
expect(tracker.hasObservedImeForHwnd(hwnd)).toBe(false)
|
||||
|
||||
// 키다운 훅 도중에는 SendMessageTimeoutW(WM_IME_CONTROL) 를 호출하지 않으므로 koreanIme 가 생략된다.
|
||||
for (const vk of [0x50, 0x43, 0x20]) {
|
||||
tracker.onKeyDown({
|
||||
hwnd,
|
||||
windowTitle: 'Kitedesk',
|
||||
vk,
|
||||
shift: false,
|
||||
ctrl: false,
|
||||
alt: false,
|
||||
meta: false
|
||||
})
|
||||
}
|
||||
expect(tracker.currentPrefix()).toBe('pc ')
|
||||
|
||||
// 유휴 스냅샷 시점에 단 한 번 IME 상태를 동기화하면 미치환 영문 꼬리 'pc ' 가 'ㅔㅊ ' 로 복원된다.
|
||||
tracker.syncKoreanIme(true)
|
||||
expect(tracker.hasObservedImeForHwnd(hwnd)).toBe(true)
|
||||
expect(tracker.currentPrefix()).toBe('ㅔㅊ ')
|
||||
})
|
||||
})
|
||||
|
||||
describe('a visible suggestion survives a typing pause', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue