Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
maximevtush authored Jan 30, 2025
2 parents 81e1b54 + 77afd22 commit 8d8fe91
Show file tree
Hide file tree
Showing 108 changed files with 1,513 additions and 933 deletions.
2 changes: 1 addition & 1 deletion .vscode/notebooks/endgame.github-issues
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:closed reason:completed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:z-author-verified -label:unreleased -label:*not-reproducible"
"value": "$REPOS $MILESTONE is:issue is:closed reason:completed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:z-author-verified -label:unreleased -label:*not-reproducible -label:*out-of-scope"
},
{
"kind": 1,
Expand Down
4 changes: 2 additions & 2 deletions build/win32/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/win32/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "inno_updater"
version = "0.12.0"
version = "0.12.1"
authors = ["Microsoft <[email protected]>"]
build = "build.rs"

Expand Down
2 changes: 1 addition & 1 deletion build/win32/code.iss
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\.plist\OpenWithProgid
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\.plist\OpenWithProgids"; ValueType: string; ValueName: "{#RegValueName}.plist"; ValueData: ""; Flags: uninsdeletevalue; Tasks: associatewithfiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\{#RegValueName}.plist"; ValueType: string; ValueName: ""; ValueData: "{cm:SourceFile,Properties file}"; Flags: uninsdeletekey; Tasks: associatewithfiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\{#RegValueName}.plist"; ValueType: string; ValueName: "AppUserModelID"; ValueData: "{#AppUserId}"; Flags: uninsdeletekey; Tasks: associatewithfiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\{#RegValueName}.plist\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\plist.ico"; Tasks: associatewithfiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\{#RegValueName}.plist\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\default.ico"; Tasks: associatewithfiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\{#RegValueName}.plist\shell\open"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\{#ExeBasename}.exe"""; Tasks: associatewithfiles
Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\{#RegValueName}.plist\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1"""; Tasks: associatewithfiles

Expand Down
Binary file modified build/win32/inno_updater.exe
Binary file not shown.
14 changes: 7 additions & 7 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@
"title": "%command.stageAll%",
"category": "Git",
"icon": "$(add)",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.stageAllTracked",
"title": "%command.stageAllTracked%",
"category": "Git",
"icon": "$(add)",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.stageAllUntracked",
Expand Down Expand Up @@ -244,7 +244,7 @@
"title": "%command.unstageAll%",
"category": "Git",
"icon": "$(remove)",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.unstageSelectedRanges",
Expand All @@ -271,14 +271,14 @@
"title": "%command.cleanAll%",
"category": "Git",
"icon": "$(discard)",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.cleanAllTracked",
"title": "%command.cleanAllTracked%",
"category": "Git",
"icon": "$(discard)",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.cleanAllUntracked",
Expand Down Expand Up @@ -902,14 +902,14 @@
"title": "%command.viewChanges%",
"icon": "$(diff-multiple)",
"category": "Git",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.viewStagedChanges",
"title": "%command.viewStagedChanges%",
"icon": "$(diff-multiple)",
"category": "Git",
"enablement": "!operationInProgress && scmResourceGroupResourceCount > 0"
"enablement": "!operationInProgress"
},
{
"command": "git.viewUntrackedChanges",
Expand Down
14 changes: 5 additions & 9 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4070,17 +4070,13 @@ export class CommandCenter {
}

const commit = await repository.getCommit(item.ref);
const commitParentId = commit.parents.length > 0 ? commit.parents[0] : `${commit.hash}^`;
const changes = await repository.diffBetween(commitParentId, commit.hash);
const commitParentId = commit.parents.length > 0 ? commit.parents[0] : await repository.getEmptyTree();
const changes = await repository.diffTrees(commitParentId, commit.hash);
const resources = changes.map(c => toMultiFileDiffEditorUris(c, commitParentId, commit.hash));

const title = `${item.shortRef} - ${truncate(commit.message)}`;
const multiDiffSourceUri = Uri.from({ scheme: 'scm-history-item', path: `${repository.root}/${commitParentId}..${commit.hash}` });

const resources: { originalUri: Uri | undefined; modifiedUri: Uri | undefined }[] = [];
for (const change of changes) {
resources.push(toMultiFileDiffEditorUris(change, commitParentId, commit.hash));
}

return {
command: '_workbench.openMultiDiffEditor',
title: l10n.t('Open Commit'),
Expand Down Expand Up @@ -4341,11 +4337,11 @@ export class CommandCenter {
const rootUri = Uri.file(repository.root);
const commit = await repository.getCommit(historyItemId);
const title = `${getCommitShortHash(rootUri, historyItemId)} - ${truncate(commit.message)}`;
const historyItemParentId = commit.parents.length > 0 ? commit.parents[0] : `${historyItemId}^`;
const historyItemParentId = commit.parents.length > 0 ? commit.parents[0] : await repository.getEmptyTree();

const multiDiffSourceUri = Uri.from({ scheme: 'scm-history-item', path: `${repository.root}/${historyItemParentId}..${historyItemId}` });

const changes = await repository.diffBetween(historyItemParentId, historyItemId);
const changes = await repository.diffTrees(historyItemParentId, historyItemId);
const resources = changes.map(c => toMultiFileDiffEditorUris(c, historyItemParentId, historyItemId));

await commands.executeCommand('_workbench.openMultiDiffEditor', { multiDiffSourceUri, title, resources });
Expand Down
12 changes: 12 additions & 0 deletions extensions/git/src/fileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ export class GitFileSystemProvider implements FileSystemProvider {
const details = await repository.getObjectDetails(sanitizeRef(ref, path, repository), path);
return { type: FileType.File, size: details.size, mtime: this.mtime, ctime: 0 };
} catch {
// Empty tree
if (ref === await repository.getEmptyTree()) {
this.logger.warn(`[GitFileSystemProvider][stat] Empty tree - ${uri.toString()}`);
return { type: FileType.File, size: 0, mtime: this.mtime, ctime: 0 };
}

// File does not exist in git. This could be because the file is untracked or ignored
this.logger.warn(`[GitFileSystemProvider][stat] File not found - ${uri.toString()}`);
throw FileSystemError.FileNotFound();
Expand Down Expand Up @@ -194,6 +200,12 @@ export class GitFileSystemProvider implements FileSystemProvider {
try {
return await repository.buffer(sanitizeRef(ref, path, repository), path);
} catch {
// Empty tree
if (ref === await repository.getEmptyTree()) {
this.logger.warn(`[GitFileSystemProvider][readFile] Empty tree - ${uri.toString()}`);
return new Uint8Array(0);
}

// File does not exist in git. This could be because the file is untracked or ignored
this.logger.warn(`[GitFileSystemProvider][readFile] File not found - ${uri.toString()}`);
throw FileSystemError.FileNotFound();
Expand Down
21 changes: 19 additions & 2 deletions extensions/git/src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2770,8 +2770,25 @@ export class Repository implements Disposable {
return this.unpublishedCommits;
}

if (this.HEAD && this.HEAD.name && this.HEAD.upstream && this.HEAD.ahead && this.HEAD.ahead > 0) {
const ref1 = `${this.HEAD.upstream.remote}/${this.HEAD.upstream.name}`;
if (!this.HEAD?.name) {
this.unpublishedCommits = new Set<string>();
return this.unpublishedCommits;
}

if (this.HEAD.upstream) {
// Upstream
if (this.HEAD.ahead === 0) {
this.unpublishedCommits = new Set<string>();
} else {
const ref1 = `${this.HEAD.upstream.remote}/${this.HEAD.upstream.name}`;
const ref2 = this.HEAD.name;

const revList = await this.repository.revList(ref1, ref2);
this.unpublishedCommits = new Set<string>(revList);
}
} else if (this.historyProvider.currentHistoryItemBaseRef) {
// Base
const ref1 = this.historyProvider.currentHistoryItemBaseRef.id;
const ref2 = this.HEAD.name;

const revList = await this.repository.revList(ref1, ref2);
Expand Down
4 changes: 3 additions & 1 deletion extensions/git/src/timelineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export class GitTimelineProvider implements TimelineProvider {

const openComparison = l10n.t('Open Comparison');

const emptyTree = await repo.getEmptyTree();
const unpublishedCommits = await repo.getUnpublishedCommits();
const remoteHoverCommands = await provideSourceControlHistoryItemHoverCommands(this.model, repo);

Expand All @@ -243,7 +244,8 @@ export class GitTimelineProvider implements TimelineProvider {

const message = emojify(c.message);

const item = new GitTimelineItem(c.hash, commits[index + 1]?.hash ?? `${c.hash}^`, message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
const previousRef = commits[index + 1]?.hash ?? emptyTree;
const item = new GitTimelineItem(c.hash, previousRef, message, date?.getTime() ?? 0, c.hash, 'git:file:commit');
item.iconPath = new ThemeIcon('git-commit');
if (showAuthor) {
item.description = c.authorName;
Expand Down
2 changes: 1 addition & 1 deletion extensions/markdown-language-features/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"configuration.markdown.updateLinksOnFileMove.enableForDirectories": "Enable updating links when a directory is moved or renamed in the workspace.",
"configuration.markdown.occurrencesHighlight.enabled": "Enable highlighting link occurrences in the current document.",
"configuration.markdown.copyFiles.destination": {
"message": "Configures the path and file name of files created by copy/paste or drag and drop. This is a map of globs that match against a Markdown document path to the destination path where the new file should be created.\n\nThe destination path may use the following variables:\n\n- `${documentDirName}` — Absolute parent directory path of the Markdown document, e.g. `/Users/me/myProject/docs`.\n- `${documentRelativeDirName}` — Relative parent directory path of the Markdown document, e.g. `docs`. This is the same as `${documentDirName}` if the file is not part of a workspace.\n- `${documentFileName}` — The full filename of the Markdown document, e.g. `README.md`.\n- `${documentBaseName}` — The basename of the Markdown document, e.g. `README`.\n- `${documentExtName}` — The extension of the Markdown document, e.g. `md`.\n- `${documentFilePath}` — Absolute path of the Markdown document, e.g. `/Users/me/myProject/docs/README.md`.\n- `${documentRelativeFilePath}` — Relative path of the Markdown document, e.g. `docs/README.md`. This is the same as `${documentFilePath}` if the file is not part of a workspace.\n- `${documentWorkspaceFolder}` — The workspace folder for the Markdown document, e.g. `/Users/me/myProject`. This is the same as `${documentDirName}` if the file is not part of a workspace.\n- `${fileName}` — The file name of the dropped file, e.g. `image.png`.\n- `${fileExtName}` — The extension of the dropped file, e.g. `png`.\n- `${unixTime}` — The current Unix timestamp in seconds.",
"message": "Configures the path and file name of files created by copy/paste or drag and drop. This is a map of globs that match against a Markdown document path to the destination path where the new file should be created.\n\nThe destination path may use the following variables:\n\n- `${documentDirName}` — Absolute parent directory path of the Markdown document, e.g. `/Users/me/myProject/docs`.\n- `${documentRelativeDirName}` — Relative parent directory path of the Markdown document, e.g. `docs`. This is the same as `${documentDirName}` if the file is not part of a workspace.\n- `${documentFileName}` — The full filename of the Markdown document, e.g. `README.md`.\n- `${documentBaseName}` — The basename of the Markdown document, e.g. `README`.\n- `${documentExtName}` — The extension of the Markdown document, e.g. `md`.\n- `${documentFilePath}` — Absolute path of the Markdown document, e.g. `/Users/me/myProject/docs/README.md`.\n- `${documentRelativeFilePath}` — Relative path of the Markdown document, e.g. `docs/README.md`. This is the same as `${documentFilePath}` if the file is not part of a workspace.\n- `${documentWorkspaceFolder}` — The workspace folder for the Markdown document, e.g. `/Users/me/myProject`. This is the same as `${documentDirName}` if the file is not part of a workspace.\n- `${fileName}` — The file name of the dropped file, e.g. `image.png`.\n- `${fileExtName}` — The extension of the dropped file, e.g. `png`.\n- `${unixTime}` — The current Unix timestamp in milliseconds.",
"comment": [
"This setting is use the user drops or pastes image data into the editor. In this case, VS Code automatically creates a new image file in the workspace containing the dropped/pasted image.",
"It's easier to explain this setting with an example. For example, let's say the setting value was:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function resolveCopyDestinationSetting(documentUri: vscode.Uri, fileName: string
// File
['fileName', fileName], // The file name of the dropped file, e.g. `image.png`.
['fileExtName', path.extname(fileName).replace('.', '')], // The extension of the dropped file, e.g. `png`.
['unixTime', Math.floor(Date.now() / 1000).toString()], // The current Unix timestamp in seconds.
['unixTime', Date.now().toString()], // The current Unix timestamp in milliseconds.
]);

return outDest.replaceAll(/(?<escape>\\\$)|(?<!\\)\$\{(?<name>\w+)(?:\/(?<pattern>(?:\\\/|[^\}\/])+)\/(?<replacement>(?:\\\/|[^\}\/])*)\/)?\}/g, (match, _escape, name, pattern, replacement, _offset, _str, groups) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ function registerMarkdownStatusItem(selector: vscode.DocumentSelector, commandMa

const enabled = vscode.workspace.getConfiguration('markdown', markdownDoc).get(enabledSettingId);
if (enabled) {
statusItem.text = vscode.l10n.t('Link validation enabled');
statusItem.text = vscode.l10n.t('Markdown link validation enabled');
statusItem.command = {
command: commandId,
arguments: [false],
title: vscode.l10n.t('Disable'),
tooltip: vscode.l10n.t('Disable validation of Markdown links'),
};
} else {
statusItem.text = vscode.l10n.t('Link validation disabled');
statusItem.text = vscode.l10n.t('Markdown link validation disabled');
statusItem.command = {
command: commandId,
arguments: [true],
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.97.0",
"distro": "c504aa66a94bcd910e273dbbf66b2c3a9f0343f8",
"distro": "4e8c47ac95d95aa744f78305db0f163dcd407126",
"author": {
"name": "Microsoft Corporation"
},
Expand Down Expand Up @@ -75,7 +75,7 @@
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.8",
"@vscode/proxy-agent": "^0.30.0",
"@vscode/proxy-agent": "^0.31.0",
"@vscode/ripgrep": "^1.15.10",
"@vscode/spdlog": "^0.15.0",
"@vscode/sqlite3": "5.1.8-vscode",
Expand Down
4 changes: 2 additions & 2 deletions product.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
},
{
"name": "ms-vscode.js-debug",
"version": "1.96.0",
"sha256": "278cd8b129c133d834a8105d0e0699f2f940c5c159fa5c821c7b9a4f7ffd3581",
"version": "1.97.0",
"sha256": "8442c0578c80976ef17031868fd6dcc42206be75b0ca1b0e9b5d6ff965cfdf23",
"repo": "https://github.com/microsoft/vscode-js-debug",
"metadata": {
"id": "25629058-ddac-4e17-abba-74678e126c5d",
Expand Down
8 changes: 4 additions & 4 deletions remote/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@parcel/watcher": "2.5.0",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/proxy-agent": "^0.30.0",
"@vscode/proxy-agent": "^0.31.0",
"@vscode/ripgrep": "^1.15.10",
"@vscode/spdlog": "^0.15.0",
"@vscode/tree-sitter-wasm": "^0.0.5",
Expand Down
Binary file modified src/vs/base/browser/ui/codicons/codicon/codicon.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions src/vs/base/common/codiconsLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,4 +586,5 @@ export const codiconsLibrary = {
python: register('python', 0xec39),
copilotLarge: register('copilot-large', 0xec3a),
copilotWarningLarge: register('copilot-warning-large', 0xec3b),
keyboardTab: register('keyboard-tab', 0xec3c),
} as const;
16 changes: 12 additions & 4 deletions src/vs/editor/browser/rect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export class Rect {
}

public static hull(rects: Rect[]): Rect {
let left = Number.MAX_VALUE;
let top = Number.MAX_VALUE;
let right = Number.MIN_VALUE;
let bottom = Number.MIN_VALUE;
let left = Number.MAX_SAFE_INTEGER;
let top = Number.MAX_SAFE_INTEGER;
let right = Number.MIN_SAFE_INTEGER;
let bottom = Number.MIN_SAFE_INTEGER;

for (const rect of rects) {
left = Math.min(left, rect.left);
Expand Down Expand Up @@ -138,7 +138,15 @@ export class Rect {
return new Rect(this.left - delta, this.top, this.right - delta, this.bottom);
}

moveRight(delta: number): Rect {
return new Rect(this.left + delta, this.top, this.right + delta, this.bottom);
}

moveUp(delta: number): Rect {
return new Rect(this.left, this.top - delta, this.right, this.bottom - delta);
}

moveDown(delta: number): Rect {
return new Rect(this.left, this.top + delta, this.right, this.bottom + delta);
}
}
Loading

0 comments on commit 8d8fe91

Please sign in to comment.