Repository navigation
Fix terminal IME composition rendering below the cursor in Modern UI - #350140
Open
wonjang (wonjangcloud9) wants to merge 1 commit into
Open
wonjang (wonjangcloud9) wants to merge 1 commit into
wonjang (wonjangcloud9) wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the terminal IME alignment change, though validation with a real IME in VS Code is still outstanding.
No open issues 🎉
What changed in this PR
Fixes terminal IME composition alignment when Modern UI is enabled, addressing #332671 and the extra offset introduced by #330685.
Changes:
- Removes the redundant top offset from
.xterm-helpers, allowing composition text and the IME positioning textarea to align with the cursor. - Preserves the terminal’s existing vertical padding.
No actionable findings remain. The reported browser measurement confirms alignment, but validation with a real IME in VS Code is still outstanding.
| File | Description |
|---|---|
src/vs/workbench/contrib/modernUI/browser/media/padding.css |
Removes the Modern UI helper offset that displaced terminal IME composition. |
Review effort: Balanced
This branch has not been deployed
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.
Fixes #332671
With
workbench.experimental.modernUIon, IME composition text in the integrated terminal (Korean 2-Set on macOS in the report) is drawn about half a row below the cursor.Cause: #330685 gave the panel terminal's
.xterma top padding (padding-block: var(--vscode-spacing-size80)). It also settop: var(--vscode-spacing-size80)on.xterm .xterm-helpers. But xterm.js puts.xterm-helpers(the composition view and the helper textarea) inside.xterm-screen(CoreBrowserTerminal.ts:this.screenElement.appendChild(this._helperContainer)), and.xterm-screenisposition: relative. So the helpers already move down with the padding, and the extratopmoves them a second 8px. The composition view, and the textarea the OS IME candidate window is positioned from, end up 8px below the cursor row. The rows themselves are drawn in the right place.Fix: remove that rule, so
.xterm-helperskeepstop: 0fromterminal.css/xterm.css, relative to.xterm-screen.Verification: I loaded the three stylesheets from
main(xterm.css,terminal.css,modernUI/.../padding.css) into a page with the same structure:.modern-ui.monaco-workbench .part.panel .pane-body.integrated-terminal .xterm > .xterm-screen > .xterm-helpers > .composition-view. I set the composition view'stopthe wayCompositionHelperdoes (cursor row × cell height) and measured it in headless Chrome:mainThe 8 px matches the report. I haven't run a full VS Code build with a real IME. Credit to seraph7942-art, who traced the same rule in anthropics/claude-code#97389 and posted a user-CSS workaround there.
🤖 Generated with Claude Code