Skip to content

Commit fb0ed65

Browse files
author
Benjamin Pasero
committed
Merge branch 'master' into rebornix/notebookMoveNSplit
2 parents 0ca29c5 + 229602b commit fb0ed65

67 files changed

Lines changed: 1217 additions & 668 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "https://atom.io/download/electron"
2-
target "7.2.4"
2+
target "7.3.0"
33
runtime "electron"

build/builtin/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const path = require('path');
1010
let window = null;
1111

1212
app.once('ready', () => {
13-
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true } });
13+
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true, enableWebSQL: false } });
1414
window.setMenuBarVisibility(false);
1515
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
1616
// window.webContents.openDevTools();
1717
window.once('closed', () => window = null);
1818
});
1919

20-
app.on('window-all-closed', () => app.quit());
20+
app.on('window-all-closed', () => app.quit());

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
"git": {
6161
"name": "electron",
6262
"repositoryUrl": "https://github.com/electron/electron",
63-
"commitHash": "0552e0d5de46ffa3b481d741f1db5c779e201565"
63+
"commitHash": "8f502de1dc5b6df4218a900d0857de7a40301d98"
6464
}
6565
},
6666
"isOnlyProductionDependency": true,
6767
"license": "MIT",
68-
"version": "7.2.4"
68+
"version": "7.3.0"
6969
},
7070
{
7171
"component": {

extensions/image-preview/media/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@
279279
image.classList.add('scale-to-fit');
280280

281281
image.addEventListener('load', () => {
282+
if (hasLoadedImage) {
283+
return;
284+
}
282285
hasLoadedImage = true;
283286

284287
vscode.postMessage({
@@ -297,7 +300,11 @@
297300
}
298301
});
299302

300-
image.addEventListener('error', () => {
303+
image.addEventListener('error', e => {
304+
if (hasLoadedImage) {
305+
return;
306+
}
307+
301308
hasLoadedImage = true;
302309
document.body.classList.add('error');
303310
document.body.classList.remove('loading');

extensions/typescript-basics/snippets/typescript.code-snippets

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"Throw Exception": {
124124
"prefix": "throw",
125125
"body": [
126-
"throw \"$1\";",
126+
"throw new Error(\"$1\");",
127127
"$0"
128128
],
129129
"description": "Throw Exception"
@@ -167,7 +167,16 @@
167167
"}"
168168
],
169169
"description": "For-Of Loop"
170-
},
170+
},
171+
"For-Await-Of Loop": {
172+
"prefix": "forawaitof",
173+
"body": [
174+
"for await (const ${1:iterator} of ${2:object}) {",
175+
"\t$0",
176+
"}"
177+
],
178+
"description": "For-Await-Of Loop"
179+
},
171180
"Function Statement": {
172181
"prefix": "function",
173182
"body": [

extensions/vscode-notebook-tests/src/notebook.test.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,29 @@ suite('API tests', () => {
238238
await vscode.commands.executeCommand('workbench.action.splitEditor');
239239
await firstEditorDeactivate;
240240

241+
await vscode.commands.executeCommand('workbench.action.files.save');
241242
await vscode.commands.executeCommand('workbench.action.closeAllEditors');
242243
});
244+
245+
test('edit API', async function () {
246+
const resource = vscode.Uri.parse(join(vscode.workspace.rootPath || '', './first.vsctestnb'));
247+
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
248+
249+
const cellsChangeEvent = getEventOncePromise<vscode.NotebookCellsChangeEvent>(vscode.notebook.onDidChangeNotebookCells);
250+
await vscode.notebook.activeNotebookEditor!.edit(editBuilder => {
251+
editBuilder.insert(1, 'test 2', 'javascript', vscode.CellKind.Code, [], undefined);
252+
});
253+
254+
const cellChangeEventRet = await cellsChangeEvent;
255+
assert.equal(cellChangeEventRet.document, vscode.notebook.activeNotebookEditor?.document);
256+
assert.equal(cellChangeEventRet.changes.length, 1);
257+
assert.deepEqual(cellChangeEventRet.changes[0].start, 1);
258+
assert.deepEqual(cellChangeEventRet.changes[0].deletedCount, 0);
259+
assert.equal(cellChangeEventRet.changes[0].items[0], vscode.notebook.activeNotebookEditor!.document.cells[1]);
260+
261+
await vscode.commands.executeCommand('workbench.action.files.save');
262+
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
263+
});
243264
});
244265

245266
suite('notebook workflow', () => {
@@ -459,7 +480,7 @@ suite('notebook dirty state', () => {
459480
});
460481

461482
suite('notebook undo redo', () => {
462-
test('notebook open', async function () {
483+
test.skip('notebook open', async function () {
463484
const resource = vscode.Uri.parse(join(vscode.workspace.rootPath || '', './first.vsctestnb'));
464485
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
465486
assert.equal(vscode.notebook.activeNotebookEditor !== undefined, true, 'notebook first');

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-oss-dev",
33
"version": "1.46.0",
4-
"distro": "4eb4d754206e598d49d6bd0d3a1a6f0cddda92a7",
4+
"distro": "78b520b90384de74821d998535caf40bf8c97c7f",
55
"author": {
66
"name": "Microsoft Corporation"
77
},
@@ -99,7 +99,7 @@
9999
"css-loader": "^3.2.0",
100100
"debounce": "^1.0.0",
101101
"deemon": "^1.4.0",
102-
"electron": "7.2.4",
102+
"electron": "7.3.0",
103103
"eslint": "6.8.0",
104104
"eslint-plugin-jsdoc": "^19.1.0",
105105
"event-stream": "3.3.4",
@@ -181,4 +181,4 @@
181181
"windows-mutex": "0.3.0",
182182
"windows-process-tree": "0.2.4"
183183
}
184-
}
184+
}

src/vs/base/browser/contextmenu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ export interface IContextMenuDelegate {
3434
actionRunner?: IActionRunner;
3535
autoSelectFirstItem?: boolean;
3636
anchorAlignment?: AnchorAlignment;
37+
anchorAsContainer?: boolean;
3738
}
772 Bytes
Binary file not shown.

src/vs/base/browser/ui/contextview/contextview.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@
77
position: absolute;
88
z-index: 2500;
99
}
10+
11+
.context-view.fixed {
12+
all: initial;
13+
font-family: inherit;
14+
font-size: 13px;
15+
position: fixed;
16+
z-index: 2500;
17+
color: inherit;
18+
}

0 commit comments

Comments
 (0)