mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-08 09:23:38 +01:00
Fixes #49480
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user