File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,12 @@ export class CompositionHelper {
239239 this . _compositionView . style . lineHeight = cellHeight + 'px' ;
240240 this . _compositionView . style . fontFamily = this . _optionsService . rawOptions . fontFamily ;
241241 this . _compositionView . style . fontSize = this . _optionsService . rawOptions . fontSize + 'px' ;
242+ // Limit the composition view width to the space between the cursor and
243+ // the terminal's right edge, preventing it from overflowing the terminal.
244+ const maxWidth = this . _bufferService . cols * this . _renderService . dimensions . css . cell . width - cursorLeft ;
245+ this . _compositionView . style . maxWidth = maxWidth + 'px' ;
246+ this . _compositionView . style . overflow = 'hidden' ;
247+ this . _compositionView . style . direction = 'rtl' ;
242248 // Sync the textarea to the exact position of the composition view so the IME knows where the
243249 // text is.
244250 const compositionViewBounds = this . _compositionView . getBoundingClientRect ( ) ;
You can’t perform that action at this time.
0 commit comments