From e356139a1095b92e0a89be34553aeedb24aa78c0 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 17 Feb 2022 17:40:04 +0100 Subject: [PATCH] Fixes #142155: Avoid flickering by handling composition typing synchronously. Increasing the textarea width while handling the `compositionupdate` event avoids flickers in the composition suggestion list. --- .../browser/controller/textAreaHandler.ts | 7 +-- .../commands/common/commandService.ts | 51 +++++++++++-------- .../test/common/commandService.test.ts | 33 ++++++++++++ .../common/abstractExtensionService.ts | 11 ++++ .../extensions/common/extensionHostManager.ts | 19 ++++++- .../services/extensions/common/extensions.ts | 8 +++ 6 files changed, 105 insertions(+), 24 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 3738b00337f..782f1428d68 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -299,7 +299,8 @@ export class TextAreaHandler extends ViewPart { // the selection. // // However, the text on the current line needs to be made visible because - // some IME methods allow to glyphs on the current line (by pressing arrow keys). + // some IME methods allow to move to other glyphs on the current line + // (by pressing arrow keys). // // (1) The textarea might contain only some parts of the current line, // like the word before the selection. Also, the content inside the textarea @@ -308,7 +309,7 @@ export class TextAreaHandler extends ViewPart { // // (2) Also, we should not make \t characters visible, because their rendering // inside the