提交 ad28f0fe 编写于 作者: A Alex Dima

Fixes #49480

上级 aa50962c
......@@ -121,7 +121,7 @@ export class TextAreaState {
// See https://github.com/Microsoft/vscode/issues/42251
// where typing always happens at offset 0 in the textarea
// when using a custom title area in OSX and moving the window
if (strings.endsWith(currentValue, previousValue)) {
if (!strings.startsWith(currentValue, previousValue) && strings.endsWith(currentValue, previousValue)) {
// Looks like something was typed at offset 0
// ==> pretend we placed the cursor at offset 0 to begin with...
previousSelectionStart = 0;
......
......@@ -518,6 +518,20 @@ suite('TextAreaState', () => {
);
});
test('issue #49480: Double curly braces inserted', () => {
// Characters get doubled
testDeduceInput(
new TextAreaState(
'aa',
2, 2,
null, null
),
'aaa',
3, 3, true, true,
'a', 0
);
});
suite('PagedScreenReaderStrategy', () => {
function testPagedScreenReaderStrategy(lines: string[], selection: Selection, expected: TextAreaState): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册