mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-21 12:20:29 -04:00
Merge VS Code 1.21 source code (#1067)
* Initial VS Code 1.21 file copy with patches * A few more merges * Post npm install * Fix batch of build breaks * Fix more build breaks * Fix more build errors * Fix more build breaks * Runtime fixes 1 * Get connection dialog working with some todos * Fix a few packaging issues * Copy several node_modules to package build to fix loader issues * Fix breaks from master * A few more fixes * Make tests pass * First pass of license header updates * Second pass of license header updates * Fix restore dialog issues * Remove add additional themes menu items * fix select box issues where the list doesn't show up * formatting * Fix editor dispose issue * Copy over node modules to correct location on all platforms
This commit is contained in:
@@ -12,7 +12,7 @@ import { Position } from 'vs/editor/common/core/position';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import { CommonFindController, FindStartFocusAction, IFindStartOptions, NextMatchFindAction, StartFindAction } from 'vs/editor/contrib/find/findController';
|
||||
import { CommonFindController, FindStartFocusAction, IFindStartOptions, NextMatchFindAction, StartFindAction, NextSelectionMatchFindAction } from 'vs/editor/contrib/find/findController';
|
||||
import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
|
||||
import { HistoryNavigator } from 'vs/base/common/history';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
@@ -92,7 +92,7 @@ suite('FindController', () => {
|
||||
});
|
||||
}
|
||||
|
||||
test('stores to the global clipboard buffer on start find action', () => {
|
||||
/* test('stores to the global clipboard buffer on start find action', () => {
|
||||
withTestCodeEditor([
|
||||
'ABC',
|
||||
'ABC',
|
||||
@@ -165,7 +165,7 @@ suite('FindController', () => {
|
||||
|
||||
findController.dispose();
|
||||
});
|
||||
});
|
||||
}); */
|
||||
|
||||
test('issue #1857: F3, Find Next, acts like "Find Under Cursor"', () => {
|
||||
withTestCodeEditor([
|
||||
@@ -475,6 +475,64 @@ suite('FindController', () => {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
test('issue #38232: Find Next Selection, regex enabled', () => {
|
||||
withTestCodeEditor([
|
||||
'([funny]',
|
||||
'',
|
||||
'([funny]'
|
||||
], { serviceCollection: serviceCollection }, (editor, cursor) => {
|
||||
clipboardState = '';
|
||||
let findController = editor.registerAndInstantiateContribution<TestFindController>(TestFindController);
|
||||
let nextSelectionMatchFindAction = new NextSelectionMatchFindAction();
|
||||
|
||||
// toggle regex
|
||||
findController.getState().change({ isRegex: true }, false);
|
||||
|
||||
// change selection
|
||||
editor.setSelection(new Selection(1, 1, 1, 9));
|
||||
|
||||
// cmd+f3
|
||||
nextSelectionMatchFindAction.run(null, editor);
|
||||
|
||||
assert.deepEqual(editor.getSelections().map(fromRange), [
|
||||
[3, 1, 3, 9]
|
||||
]);
|
||||
|
||||
findController.dispose();
|
||||
});
|
||||
});
|
||||
|
||||
test('issue #38232: Find Next Selection, regex enabled, find widget open', () => {
|
||||
withTestCodeEditor([
|
||||
'([funny]',
|
||||
'',
|
||||
'([funny]'
|
||||
], { serviceCollection: serviceCollection }, (editor, cursor) => {
|
||||
clipboardState = '';
|
||||
let findController = editor.registerAndInstantiateContribution<TestFindController>(TestFindController);
|
||||
let startFindAction = new StartFindAction();
|
||||
let nextSelectionMatchFindAction = new NextSelectionMatchFindAction();
|
||||
|
||||
// cmd+f - open find widget
|
||||
startFindAction.run(null, editor);
|
||||
|
||||
// toggle regex
|
||||
findController.getState().change({ isRegex: true }, false);
|
||||
|
||||
// change selection
|
||||
editor.setSelection(new Selection(1, 1, 1, 9));
|
||||
|
||||
// cmd+f3
|
||||
nextSelectionMatchFindAction.run(null, editor);
|
||||
|
||||
assert.deepEqual(editor.getSelections().map(fromRange), [
|
||||
[3, 1, 3, 9]
|
||||
]);
|
||||
|
||||
findController.dispose();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('FindController query options persistence', () => {
|
||||
|
||||
Reference in New Issue
Block a user