mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 4d91d96e5e121b38d33508cdef17868bab255eae
This commit is contained in:
committed by
AzureDataStudio
parent
a971aee5bd
commit
5e7071e466
@@ -2208,6 +2208,70 @@ suite('Editor Controller - Regression tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('issue #98320: Multi-Cursor, Wrap lines and cursorSelectRight ==> cursors out of sync', () => {
|
||||
// a single model line => 4 view lines
|
||||
withTestCodeEditor([
|
||||
[
|
||||
'lorem_ipsum-1993x11x13',
|
||||
'dolor_sit_amet-1998x04x27',
|
||||
'consectetur-2007x10x08',
|
||||
'adipiscing-2012x07x27',
|
||||
'elit-2015x02x27',
|
||||
].join('\n')
|
||||
], { wordWrap: 'wordWrapColumn', wordWrapColumn: 16 }, (editor, viewModel) => {
|
||||
viewModel.setSelections('test', [
|
||||
new Selection(1, 13, 1, 13),
|
||||
new Selection(2, 16, 2, 16),
|
||||
new Selection(3, 13, 3, 13),
|
||||
new Selection(4, 12, 4, 12),
|
||||
new Selection(5, 6, 5, 6),
|
||||
]);
|
||||
assertCursor(viewModel, [
|
||||
new Selection(1, 13, 1, 13),
|
||||
new Selection(2, 16, 2, 16),
|
||||
new Selection(3, 13, 3, 13),
|
||||
new Selection(4, 12, 4, 12),
|
||||
new Selection(5, 6, 5, 6),
|
||||
]);
|
||||
|
||||
moveRight(editor, viewModel, true);
|
||||
assertCursor(viewModel, [
|
||||
new Selection(1, 13, 1, 14),
|
||||
new Selection(2, 16, 2, 17),
|
||||
new Selection(3, 13, 3, 14),
|
||||
new Selection(4, 12, 4, 13),
|
||||
new Selection(5, 6, 5, 7),
|
||||
]);
|
||||
|
||||
moveRight(editor, viewModel, true);
|
||||
assertCursor(viewModel, [
|
||||
new Selection(1, 13, 1, 15),
|
||||
new Selection(2, 16, 2, 18),
|
||||
new Selection(3, 13, 3, 15),
|
||||
new Selection(4, 12, 4, 14),
|
||||
new Selection(5, 6, 5, 8),
|
||||
]);
|
||||
|
||||
moveRight(editor, viewModel, true);
|
||||
assertCursor(viewModel, [
|
||||
new Selection(1, 13, 1, 16),
|
||||
new Selection(2, 16, 2, 19),
|
||||
new Selection(3, 13, 3, 16),
|
||||
new Selection(4, 12, 4, 15),
|
||||
new Selection(5, 6, 5, 9),
|
||||
]);
|
||||
|
||||
moveRight(editor, viewModel, true);
|
||||
assertCursor(viewModel, [
|
||||
new Selection(1, 13, 1, 17),
|
||||
new Selection(2, 16, 2, 20),
|
||||
new Selection(3, 13, 3, 17),
|
||||
new Selection(4, 12, 4, 16),
|
||||
new Selection(5, 6, 5, 10),
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
test('issue #41573 - delete across multiple lines does not shrink the selection when word wraps', () => {
|
||||
withTestCodeEditor([
|
||||
'Authorization: \'Bearer pHKRfCTFSnGxs6akKlb9ddIXcca0sIUSZJutPHYqz7vEeHdMTMh0SGN0IGU3a0n59DXjTLRsj5EJ2u33qLNIFi9fk5XF8pK39PndLYUZhPt4QvHGLScgSkK0L4gwzkzMloTQPpKhqiikiIOvyNNSpd2o8j29NnOmdTUOKi9DVt74PD2ohKxyOrWZ6oZprTkb3eKajcpnS0LABKfaw2rmv4\','
|
||||
|
||||
@@ -25,7 +25,7 @@ export class TestCodeEditorService extends AbstractCodeEditorService {
|
||||
}
|
||||
|
||||
export class TestCommandService implements ICommandService {
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
private readonly _instantiationService: IInstantiationService;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ suite('OpenerService', function () {
|
||||
let lastCommand: { id: string; args: any[] } | undefined;
|
||||
|
||||
const commandService = new (class implements ICommandService {
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
onWillExecuteCommand = () => Disposable.None;
|
||||
onDidExecuteCommand = () => Disposable.None;
|
||||
executeCommand(id: string, ...args: any[]): Promise<any> {
|
||||
|
||||
@@ -18,7 +18,7 @@ export const javascriptOnEnterRules = [
|
||||
}, {
|
||||
// e.g. * ...|
|
||||
beforeText: /^(\t|[ ])*[ ]\*([ ]([^\*]|\*(?!\/))*)?$/,
|
||||
oneLineAboveText: /^(\s*(\/\*\*|\*)).*/,
|
||||
oneLineAboveText: /(?=^(\s*(\/\*\*|\*)).*)(?=(?!(\s*\*\/)))/,
|
||||
action: { indentAction: IndentAction.None, appendText: '* ' }
|
||||
}, {
|
||||
// e.g. */|
|
||||
|
||||
@@ -118,6 +118,7 @@ suite('OnEnter', () => {
|
||||
testIndentAction(' *', ' * asdfsfagadfg * / * / * /*', '', IndentAction.None, '* ');
|
||||
|
||||
testIndentAction('', ' */', '', IndentAction.None, null, 1);
|
||||
testIndentAction(' */', ' * test() {', '', IndentAction.Indent, null, 0);
|
||||
testIndentAction('', '\t */', '', IndentAction.None, null, 1);
|
||||
testIndentAction('', '\t\t */', '', IndentAction.None, null, 1);
|
||||
testIndentAction('', ' */', '', IndentAction.None, null, 1);
|
||||
|
||||
@@ -442,7 +442,7 @@ assertComputeEdits(file1, file2);
|
||||
|
||||
export class TestTextResourcePropertiesService implements ITextResourcePropertiesService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
declare readonly _serviceBrand: undefined;
|
||||
|
||||
constructor(
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
|
||||
Reference in New Issue
Block a user