Skip to content

Commit 5c0a53d

Browse files
authored
Merge branch 'main' into extensionCodeblockLangFix
2 parents a231a0c + 4058211 commit 5c0a53d

File tree

80 files changed

+586
-685
lines changed

Some content is hidden

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

80 files changed

+586
-685
lines changed

.vscode/notebooks/my-work.github-issues

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
{
103103
"kind": 2,
104104
"language": "github-issues",
105-
"value": "repo:microsoft/vscode assignee:@me is:open type:issue -label:\"info-needed\" -label:api -label:api-finalization -label:api-proposal -label:authentication -label:bisect-ext -label:bracket-pair-colorization -label:bracket-pair-guides -label:breadcrumbs -label:callhierarchy -label:chrome-devtools -label:code-lens -label:command-center -label:comments -label:config -label:context-keys -label:custom-editors -label:debug -label:debug-console -label:debug-disassembly -label:dialogs -label:diff-editor -label:dropdown -label:editor-api -label:editor-autoclosing -label:editor-autoindent -label:editor-bracket-matching -label:editor-clipboard -label:editor-code-actions -label:editor-color-picker -label:editor-columnselect -label:editor-commands -label:editor-comments -label:editor-contrib -label:editor-core -label:editor-drag-and-drop -label:editor-error-widget -label:editor-find -label:editor-folding -label:editor-highlight -label:editor-hover -label:editor-indent-detection -label:editor-indent-guides -label:editor-input -label:editor-input-IME -label:editor-insets -label:editor-minimap -label:editor-multicursor -label:editor-parameter-hints -label:editor-render-whitespace -label:editor-rendering -label:editor-RTL -label:editor-scrollbar -label:editor-sorting -label:editor-sticky-scroll -label:editor-sticky-scroll-decorations -label:editor-symbols -label:editor-synced-region -label:editor-textbuffer -label:editor-theming -label:editor-wordnav -label:editor-wrapping -label:emmet-parse -label:extension-activation -label:extension-host -label:extension-prerelease -label:extension-recommendations -label:extension-signature -label:extensions -label:extensions-development -label:file-decorations -label:file-encoding -label:file-explorer -label:file-glob -label:file-io -label:file-nesting -label:file-watcher -label:font-rendering -label:formatting -label:getting-started -label:ghost-text -label:git -label:github -label:github-repositories -label:gpu -label:grammar -label:grid-widget -label:icon-brand -label:icons-product -label:icons-widget -label:inlay-hints -label:inline-chat -label:inline-completions -label:install-update -label:intellisense-config -label:interactive-playground -label:interactive-window -label:javascript -label:json -label:json-sorting -label:keybindings -label:keybindings-editor -label:keyboard-layout -label:L10N -label:l10n-platform -label:label-provider -label:languages-basic -label:languages-diagnostics -label:languages-guessing -label:layout -label:lcd-text-rendering -label:list-widget -label:live-preview -label:log -label:markdown -label:marketplace -label:menus -label:merge-conflict -label:merge-editor -label:merge-editor-workbench -label:monaco-editor -label:multi-monitor -label:native-file-dialog -label:network -label:notebook -label:notebook-accessibility -label:notebook-api -label:notebook-builtin-renderers -label:notebook-cell-editor -label:notebook-celltoolbar -label:notebook-clipboard -label:notebook-code-actions -label:notebook-commands -label:notebook-commenting -label:notebook-debugging -label:notebook-diff -label:notebook-dnd -label:notebook-execution -label:notebook-find -label:notebook-folding -label:notebook-format -label:notebook-getting-started -label:notebook-globaltoolbar -label:notebook-ipynb -label:notebook-kernel -label:notebook-kernel-picker -label:notebook-language -label:notebook-layout -label:notebook-markdown -label:notebook-minimap -label:notebook-multiselect -label:notebook-output -label:notebook-perf -label:notebook-remote -label:notebook-rendering -label:notebook-serialization -label:notebook-statusbar -label:notebook-sticky-scroll -label:notebook-toc-outline -label:notebook-undo-redo -label:notebook-variables -label:notebook-workbench-integration -label:notebook-workflow -label:open-editors -label:opener -label:outline -label:output -label:packaging -label:panel-chat -label:perf -label:perf-bloat -label:perf-startup -label:php -label:portable-mode -label:proxy -label:quick-open -label:quick-pick -label:quickpick-chat -label:references-viewlet -label:release-notes -label:remote -label:remote-connection -label:remote-desktop -label:remote-explorer -label:remote-tunnel -label:rename -label:runCommands -label:sandbox -label:sash-widget -label:scm -label:screencast-mode -label:search -label:search-api -label:search-editor -label:search-replace -label:semantic-tokens -label:server -label:settings-editor -label:settings-search -label:settings-sync -label:settings-sync-server -label:shared-process -label:simple-file-dialog -label:smart-select -label:snap -label:snippets -label:splitview-widget -label:ssh -label:suggest -label:system-context-menu -label:table-widget -label:tasks -label:telemetry -label:terminal -label:terminal-accessibility -label:terminal-conpty -label:terminal-editors -label:terminal-external -label:terminal-find -label:terminal-input -label:terminal-layout -label:terminal-links -label:terminal-local-echo -label:terminal-persistence -label:terminal-process -label:terminal-profiles -label:terminal-quick-fix -label:terminal-rendering -label:terminal-shell-bash -label:terminal-shell-cmd -label:terminal-shell-fish -label:terminal-shell-git-bash -label:terminal-shell-integration -label:terminal-shell-pwsh -label:terminal-shell-zsh -label:terminal-tabs -label:testing -label:themes -label:timeline -label:timeline-git -label:timeline-local-history -label:titlebar -label:tokenization -label:touch/pointer -label:trackpad/scroll -label:tree-views -label:tree-widget -label:typescript -label:unc -label:undo-redo -label:unicode-highlight -label:uri -label:user-profiles -label:ux -label:variable-resolving -label:VIM -label:virtual-documents -label:virtual-workspaces -label:vscode-website -label:vscode.dev -label:web -label:webview -label:webview-views -label:workbench-actions -label:workbench-auxwindow -label:workbench-banner -label:workbench-cli -label:workbench-diagnostics -label:workbench-dnd -label:workbench-editor-grid -label:workbench-editor-groups -label:workbench-editor-resolver -label:workbench-editors -label:workbench-electron -label:workbench-fonts -label:workbench-history -label:workbench-hot-exit -label:workbench-hover -label:workbench-launch -label:workbench-link -label:workbench-multiroot -label:workbench-notifications -label:workbench-os-integration -label:workbench-rapid-render -label:workbench-run-as-admin -label:workbench-state -label:workbench-status -label:workbench-tabs -label:workbench-touchbar -label:workbench-untitled-editors -label:workbench-views -label:workbench-voice -label:workbench-welcome -label:workbench-window -label:workbench-workspace -label:workbench-zen -label:workspace-edit -label:workspace-symbols -label:workspace-trust -label:zoom -label:error-list -label:winget"
105+
"value": "repo:microsoft/vscode assignee:@me is:open type:issue -label:\"info-needed\" -label:api -label:api-finalization -label:api-proposal -label:authentication -label:bisect-ext -label:bracket-pair-colorization -label:bracket-pair-guides -label:breadcrumbs -label:callhierarchy -label:chrome-devtools -label:code-lens -label:command-center -label:comments -label:config -label:context-keys -label:custom-editors -label:debug -label:debug-console -label:debug-disassembly -label:dialogs -label:diff-editor -label:dropdown -label:editor-api -label:editor-autoclosing -label:editor-autoindent -label:editor-bracket-matching -label:editor-clipboard -label:editor-code-actions -label:editor-color-picker -label:editor-columnselect -label:editor-commands -label:editor-comments -label:editor-contrib -label:editor-core -label:editor-drag-and-drop -label:editor-error-widget -label:editor-find -label:editor-folding -label:editor-highlight -label:editor-hover -label:editor-indent-detection -label:editor-indent-guides -label:editor-input -label:editor-input-IME -label:editor-insets -label:editor-minimap -label:editor-multicursor -label:editor-parameter-hints -label:editor-render-whitespace -label:editor-rendering -label:editor-RTL -label:editor-scrollbar -label:editor-sorting -label:editor-sticky-scroll -label:editor-sticky-scroll-decorations -label:editor-symbols -label:editor-synced-region -label:editor-textbuffer -label:editor-theming -label:editor-wordnav -label:editor-wrapping -label:emmet-parse -label:extension-activation -label:extension-host -label:extension-prerelease -label:extension-recommendations -label:extension-signature -label:extensions -label:extensions-development -label:file-decorations -label:file-encoding -label:file-explorer -label:file-glob -label:file-io -label:file-nesting -label:file-watcher -label:font-rendering -label:formatting -label:getting-started -label:ghost-text -label:git -label:github -label:github-repositories -label:gpu -label:grammar -label:grid-widget -label:icon-brand -label:icons-product -label:icons-widget -label:inlay-hints -label:inline-chat -label:inline-completions -label:install-update -label:intellisense-config -label:interactive-playground -label:interactive-window -label:javascript -label:json -label:json-sorting -label:keybindings -label:keybindings-editor -label:keyboard-layout -label:L10N -label:l10n-platform -label:label-provider -label:languages-basic -label:languages-diagnostics -label:languages-guessing -label:layout -label:lcd-text-rendering -label:list-widget -label:live-preview -label:log -label:markdown -label:marketplace -label:menus -label:merge-conflict -label:merge-editor -label:merge-editor-workbench -label:monaco-editor -label:multi-monitor -label:native-file-dialog -label:network -label:notebook -label:notebook-accessibility -label:notebook-api -label:notebook-cell-editor -label:notebook-celltoolbar -label:notebook-clipboard -label:notebook-code-actions -label:notebook-commands -label:notebook-debugging -label:notebook-diff -label:notebook-dnd -label:notebook-execution -label:notebook-find -label:notebook-folding -label:notebook-format -label:notebook-getting-started -label:notebook-globaltoolbar -label:notebook-ipynb -label:notebook-kernel -label:notebook-kernel-picker -label:notebook-language -label:notebook-layout -label:notebook-markdown -label:notebook-output -label:notebook-perf -label:notebook-remote -label:notebook-serialization -label:notebook-statusbar -label:notebook-sticky-scroll -label:notebook-toc-outline -label:notebook-undo-redo -label:notebook-variables -label:notebook-workbench-integration -label:notebook-workflow -label:open-editors -label:opener -label:outline -label:output -label:packaging -label:panel-chat -label:perf -label:perf-bloat -label:perf-startup -label:php -label:portable-mode -label:proxy -label:quick-open -label:quick-pick -label:quickpick-chat -label:references-viewlet -label:release-notes -label:remote -label:remote-connection -label:remote-desktop -label:remote-explorer -label:remote-tunnel -label:rename -label:runCommands -label:sandbox -label:sash-widget -label:scm -label:screencast-mode -label:search -label:search-api -label:search-editor -label:search-replace -label:semantic-tokens -label:server -label:settings-editor -label:settings-search -label:settings-sync -label:settings-sync-server -label:shared-process -label:simple-file-dialog -label:smart-select -label:snap -label:snippets -label:splitview-widget -label:ssh -label:suggest -label:system-context-menu -label:table-widget -label:tasks -label:telemetry -label:terminal -label:terminal-accessibility -label:terminal-conpty -label:terminal-editors -label:terminal-external -label:terminal-find -label:terminal-input -label:terminal-layout -label:terminal-links -label:terminal-local-echo -label:terminal-persistence -label:terminal-process -label:terminal-profiles -label:terminal-quick-fix -label:terminal-rendering -label:terminal-shell-bash -label:terminal-shell-cmd -label:terminal-shell-fish -label:terminal-shell-git-bash -label:terminal-shell-integration -label:terminal-shell-pwsh -label:terminal-shell-zsh -label:terminal-tabs -label:testing -label:themes -label:timeline -label:timeline-git -label:timeline-local-history -label:titlebar -label:tokenization -label:touch/pointer -label:trackpad/scroll -label:tree-views -label:tree-widget -label:typescript -label:unc -label:undo-redo -label:unicode-highlight -label:uri -label:user-profiles -label:ux -label:variable-resolving -label:VIM -label:virtual-documents -label:virtual-workspaces -label:vscode-website -label:vscode.dev -label:web -label:webview -label:webview-views -label:workbench-actions -label:workbench-auxwindow -label:workbench-banner -label:workbench-cli -label:workbench-diagnostics -label:workbench-dnd -label:workbench-editor-grid -label:workbench-editor-groups -label:workbench-editor-resolver -label:workbench-editors -label:workbench-electron -label:workbench-fonts -label:workbench-history -label:workbench-hot-exit -label:workbench-hover -label:workbench-launch -label:workbench-link -label:workbench-multiroot -label:workbench-notifications -label:workbench-os-integration -label:workbench-rapid-render -label:workbench-run-as-admin -label:workbench-state -label:workbench-status -label:workbench-tabs -label:workbench-touchbar -label:workbench-untitled-editors -label:workbench-views -label:workbench-voice -label:workbench-welcome -label:workbench-window -label:workbench-workspace -label:workbench-zen -label:workspace-edit -label:workspace-symbols -label:workspace-trust -label:zoom -label:error-list -label:winget -label:cross-file-editing -label:editor-refactor-preview"
106106
},
107107
{
108108
"kind": 1,

cli/src/util/prereqs.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use super::errors::CodeError;
1515

1616
lazy_static! {
1717
static ref LDCONFIG_STDC_RE: Regex = Regex::new(r"libstdc\+\+.* => (.+)").unwrap();
18-
static ref LDD_VERSION_RE: BinRegex = BinRegex::new(r"^ldd.*(.+)\.(.+)\s").unwrap();
18+
static ref LDD_VERSION_RE: BinRegex = BinRegex::new(r"^ldd.*\s(\d+)\.(\d+)(?:\.(\d+))?\s").unwrap();
1919
static ref GENERIC_VERSION_RE: Regex = Regex::new(r"^([0-9]+)\.([0-9]+)$").unwrap();
2020
static ref LIBSTD_CXX_VERSION_RE: BinRegex =
2121
BinRegex::new(r"GLIBCXX_([0-9]+)\.([0-9]+)(?:\.([0-9]+))?").unwrap();
@@ -401,5 +401,18 @@ mod tests {
401401
extract_ldd_version(&actual),
402402
Some(SimpleSemver::new(2, 31, 0)),
403403
);
404+
405+
let actual2 = "ldd (GNU libc) 2.40.9000
406+
Copyright (C) 2024 Free Software Foundation, Inc.
407+
This is free software; see the source for copying conditions. There is NO
408+
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
409+
Written by Roland McGrath and Ulrich Drepper."
410+
.to_owned()
411+
.into_bytes();
412+
assert_eq!(
413+
extract_ldd_version(&actual2),
414+
Some(SimpleSemver::new(2, 40, 0)),
415+
);
404416
}
417+
405418
}

extensions/git/src/blame.ts

+22-13
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ class GitBlameInformationCache {
144144
}
145145

146146
export class GitBlameController {
147+
private readonly _subjectMaxLength = 50;
148+
147149
private readonly _onDidChangeBlameInformation = new EventEmitter<TextEditor>();
148150
public readonly onDidChangeBlameInformation = this._onDidChangeBlameInformation.event;
149151

@@ -169,10 +171,14 @@ export class GitBlameController {
169171
}
170172

171173
formatBlameInformationMessage(template: string, blameInformation: BlameInformation): string {
174+
const subject = blameInformation.subject && blameInformation.subject.length > this._subjectMaxLength
175+
? `${blameInformation.subject.substring(0, this._subjectMaxLength)}\u2026`
176+
: blameInformation.subject;
177+
172178
const templateTokens = {
173179
hash: blameInformation.hash,
174180
hashShort: blameInformation.hash.substring(0, 8),
175-
subject: emojify(blameInformation.subject ?? ''),
181+
subject: emojify(subject ?? ''),
176182
authorName: blameInformation.authorName ?? '',
177183
authorEmail: blameInformation.authorEmail ?? '',
178184
authorDate: new Date(blameInformation.authorDate ?? new Date()).toLocaleString(),
@@ -421,6 +427,8 @@ class GitBlameEditorDecoration {
421427
this._disposables.push(this._decorationType);
422428

423429
workspace.onDidChangeConfiguration(this._onDidChangeConfiguration, this, this._disposables);
430+
window.onDidChangeActiveTextEditor(this._onDidChangeActiveTextEditor, this, this._disposables);
431+
424432
this._controller.onDidChangeBlameInformation(e => this._updateDecorations(e), this, this._disposables);
425433
}
426434

@@ -439,6 +447,18 @@ class GitBlameEditorDecoration {
439447
}
440448
}
441449

450+
private _onDidChangeActiveTextEditor(): void {
451+
if (!this._getConfiguration().enabled) {
452+
return;
453+
}
454+
455+
for (const editor of window.visibleTextEditors) {
456+
if (editor !== window.activeTextEditor) {
457+
editor.setDecorations(this._decorationType, []);
458+
}
459+
}
460+
}
461+
442462
private _getConfiguration(): { enabled: boolean; template: string } {
443463
const config = workspace.getConfiguration('git');
444464
const enabled = config.get<boolean>('blame.editorDecoration.enabled', false);
@@ -453,15 +473,6 @@ class GitBlameEditorDecoration {
453473
return;
454474
}
455475

456-
// Clear decorations for the other editors
457-
for (const editor of window.visibleTextEditors) {
458-
if (editor === textEditor) {
459-
continue;
460-
}
461-
462-
editor.setDecorations(this._decorationType, []);
463-
}
464-
465476
// Only support resources with `file` and `git` schemes
466477
if (textEditor.document.uri.scheme !== 'file' && !isGitUri(textEditor.document.uri)) {
467478
textEditor.setDecorations(this._decorationType, []);
@@ -543,9 +554,7 @@ class GitBlameStatusBarItem {
543554
return;
544555
}
545556

546-
if (window.activeTextEditor) {
547-
this._updateStatusBarItem(window.activeTextEditor);
548-
} else {
557+
if (!window.activeTextEditor) {
549558
this._statusBarItem?.hide();
550559
}
551560
}

extensions/git/src/decorationProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,11 @@ class GitDecorationProvider implements FileDecorationProvider {
118118
private onDidRunGitStatus(): void {
119119
const newDecorations = new Map<string, FileDecoration>();
120120

121-
this.collectSubmoduleDecorationData(newDecorations);
122121
this.collectDecorationData(this.repository.indexGroup, newDecorations);
123122
this.collectDecorationData(this.repository.untrackedGroup, newDecorations);
124123
this.collectDecorationData(this.repository.workingTreeGroup, newDecorations);
125124
this.collectDecorationData(this.repository.mergeGroup, newDecorations);
125+
this.collectSubmoduleDecorationData(newDecorations);
126126

127127
const uris = new Set([...this.decorations.keys()].concat([...newDecorations.keys()]));
128128
this.decorations = newDecorations;

extensions/github/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"commandPalette": [
7070
{
7171
"command": "github.publish",
72-
"when": "git-base.gitEnabled && remoteName != 'codespaces'"
72+
"when": "git-base.gitEnabled && workspaceFolderCount != 0 && remoteName != 'codespaces'"
7373
},
7474
{
7575
"command": "github.copyVscodeDevLink",

extensions/json-language-features/package.json

+6
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@
139139
"strings": true
140140
},
141141
"editor.suggest.insertMode": "replace"
142+
},
143+
"[snippets]": {
144+
"editor.quickSuggestions": {
145+
"strings": true
146+
},
147+
"editor.suggest.insertMode": "replace"
142148
}
143149
},
144150
"jsonValidation": [

0 commit comments

Comments
 (0)