Skip to content

Commit e879ee4

Browse files
authored
Merge branch 'main' into fix-200430
2 parents 747461c + 536dcce commit e879ee4

File tree

81 files changed

+1358
-504
lines changed

Some content is hidden

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

81 files changed

+1358
-504
lines changed

.eslintrc.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -254,15 +254,8 @@
254254
"src/vs/workbench/contrib/editSessions/test/browser/editSessions.test.ts",
255255
"src/vs/workbench/contrib/extensions/test/common/extensionQuery.test.ts",
256256
"src/vs/workbench/contrib/extensions/test/electron-sandbox/extension.test.ts",
257-
"src/vs/workbench/contrib/notebook/test/browser/cellDnd.test.ts",
258-
"src/vs/workbench/contrib/notebook/test/browser/contrib/contributedStatusBarItemController.test.ts",
259-
"src/vs/workbench/contrib/notebook/test/browser/contrib/executionStatusBarItem.test.ts",
260-
"src/vs/workbench/contrib/notebook/test/browser/contrib/layoutActions.test.ts",
261-
"src/vs/workbench/contrib/notebook/test/browser/contrib/outputCopyTests.test.ts",
262-
"src/vs/workbench/contrib/notebook/test/browser/notebookBrowser.test.ts",
263257
"src/vs/workbench/contrib/notebook/test/browser/notebookExecutionService.test.ts",
264258
"src/vs/workbench/contrib/notebook/test/browser/notebookExecutionStateService.test.ts",
265-
"src/vs/workbench/contrib/notebook/test/browser/notebookTextModel.test.ts",
266259
"src/vs/workbench/contrib/snippets/test/browser/snippetFile.test.ts",
267260
"src/vs/workbench/contrib/snippets/test/browser/snippetsRegistry.test.ts",
268261
"src/vs/workbench/contrib/snippets/test/browser/snippetsRewrite.test.ts",
@@ -275,12 +268,6 @@
275268
"src/vs/workbench/services/keybinding/test/node/fallbackKeyboardMapper.test.ts",
276269
"src/vs/workbench/services/keybinding/test/node/macLinuxKeyboardMapper.test.ts",
277270
"src/vs/workbench/services/keybinding/test/node/windowsKeyboardMapper.test.ts",
278-
"src/vs/workbench/services/search/test/browser/queryBuilder.test.ts",
279-
"src/vs/workbench/services/search/test/common/ignoreFile.test.ts",
280-
"src/vs/workbench/services/search/test/common/queryBuilder.test.ts",
281-
"src/vs/workbench/services/search/test/common/replace.test.ts",
282-
"src/vs/workbench/services/search/test/common/searchHelpers.test.ts",
283-
"src/vs/workbench/services/search/test/node/ripgrepTextSearchEngineUtils.test.ts",
284271
"src/vs/workbench/services/telemetry/test/browser/commonProperties.test.ts",
285272
"src/vs/workbench/services/themes/test/node/tokenStyleResolving.test.ts",
286273
"src/vs/workbench/services/userActivity/test/browser/domActivityTracker.test.ts",

extensions/git-base/languages/git-commit.language-configuration.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,14 @@
77
["{", "}"],
88
["[", "]"],
99
["(", ")"]
10+
],
11+
"autoClosingPairs": [
12+
{ "open": "{", "close": "}" },
13+
{ "open": "[", "close": "]" },
14+
{ "open": "(", "close": ")" },
15+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
16+
{ "open": "\"", "close": "\"", "notIn": ["string"] },
17+
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
18+
{ "open": "/**", "close": " */", "notIn": ["string"] }
1019
]
11-
}
20+
}

extensions/git-base/languages/git-rebase.language-configuration.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,14 @@
77
["{", "}"],
88
["[", "]"],
99
["(", ")"]
10+
],
11+
"autoClosingPairs": [
12+
{ "open": "{", "close": "}" },
13+
{ "open": "[", "close": "]" },
14+
{ "open": "(", "close": ")" },
15+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
16+
{ "open": "\"", "close": "\"", "notIn": ["string"] },
17+
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
18+
{ "open": "/**", "close": " */", "notIn": ["string"] }
1019
]
11-
}
20+
}
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
22
"comments": {
33
"lineComment": "#",
4-
}
4+
},
5+
"autoClosingPairs": [
6+
{ "open": "{", "close": "}" },
7+
{ "open": "[", "close": "]" },
8+
{ "open": "(", "close": ")" },
9+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
10+
{ "open": "\"", "close": "\"", "notIn": ["string"] },
11+
{ "open": "`", "close": "`", "notIn": ["string", "comment"] },
12+
{ "open": "/**", "close": " */", "notIn": ["string"] }
13+
]
514
}

extensions/git/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2961,8 +2961,10 @@
29612961
"configurationDefaults": {
29622962
"[git-commit]": {
29632963
"editor.rulers": [
2964+
50,
29642965
72
29652966
],
2967+
"editor.wordWrap": "off",
29662968
"workbench.editor.restoreViewState": false
29672969
},
29682970
"[git-rebase]": {

extensions/git/src/git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2543,7 +2543,7 @@ export class Repository {
25432543
return branch;
25442544
}
25452545

2546-
return Promise.reject<Branch>(new Error('No such branch'));
2546+
return Promise.reject<Branch>(new Error(`No such branch: ${name}`));
25472547
}
25482548

25492549
async getDefaultBranch(): Promise<Branch> {

extensions/xml/xml.language-configuration.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
{ "open": "(", "close": ")" },
1515
{ "open": "\"", "close": "\"", "notIn": ["string"] },
1616
{ "open": "'", "close": "'", "notIn": ["string"] },
17-
{ "open": "<!--", "close": "-->", "notIn": [ "comment", "string" ]},
18-
{ "open": "<![CDATA[", "close": "]]>", "notIn": [ "comment", "string" ]}
17+
{ "open": "<!--", "close": "-->", "notIn": [ "comment", "string" ]}
1918
],
2019
"surroundingPairs": [
2120
{ "open": "'", "close": "'" },

src/vs/base/browser/ui/iconLabel/iconLabelHover.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,26 @@ export function setupCustomHover(hoverDelegate: IHoverDelegate, htmlElement: HTM
191191
}, delay);
192192
};
193193

194+
let isMouseDown = false;
195+
const mouseDownEmitter = dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_DOWN, () => {
196+
isMouseDown = true;
197+
hideHover(true, true);
198+
}, true);
199+
const mouseUpEmitter = dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_UP, () => {
200+
isMouseDown = false;
201+
}, true);
202+
const mouseLeaveEmitter = dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_LEAVE, (e: MouseEvent) => {
203+
isMouseDown = false;
204+
hideHover(false, (<any>e).fromElement === htmlElement);
205+
}, true);
206+
194207
const onMouseOver = () => {
195208
if (hoverPreparation) {
196209
return;
197210
}
198211

199212
const toDispose: DisposableStore = new DisposableStore();
200213

201-
const onMouseLeave = (e: MouseEvent) => hideHover(false, (<any>e).fromElement === htmlElement);
202-
toDispose.add(dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_LEAVE, onMouseLeave, true));
203-
204-
const onMouseDown = () => hideHover(true, true);
205-
toDispose.add(dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_DOWN, onMouseDown, true));
206-
207214
const target: IHoverDelegateTarget = {
208215
targetElements: [htmlElement],
209216
dispose: () => { }
@@ -225,7 +232,7 @@ export function setupCustomHover(hoverDelegate: IHoverDelegate, htmlElement: HTM
225232
const mouseOverDomEmitter = dom.addDisposableListener(htmlElement, dom.EventType.MOUSE_OVER, onMouseOver, true);
226233

227234
const onFocus = () => {
228-
if (hoverPreparation) {
235+
if (isMouseDown || hoverPreparation) {
229236
return;
230237
}
231238
const target: IHoverDelegateTarget = {
@@ -253,6 +260,9 @@ export function setupCustomHover(hoverDelegate: IHoverDelegate, htmlElement: HTM
253260
},
254261
dispose: () => {
255262
mouseOverDomEmitter.dispose();
263+
mouseLeaveEmitter.dispose();
264+
mouseDownEmitter.dispose();
265+
mouseUpEmitter.dispose();
256266
focusDomEmitter.dispose();
257267
hideHover(true, true);
258268
}

src/vs/base/common/labels.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,15 +436,17 @@ export function unmnemonicLabel(label: string): string {
436436
}
437437

438438
/**
439-
* Splits a recent label in name and parent path, supporting both '/' and '\' and workspace suffixes
439+
* Splits a recent label in name and parent path, supporting both '/' and '\' and workspace suffixes.
440+
* If the location is remote, the remote name is included in the name part.
440441
*/
441-
export function splitRecentLabel(recentLabel: string) {
442+
export function splitRecentLabel(recentLabel: string): { name: string; parentPath: string } {
442443
if (recentLabel.endsWith(']')) {
443444
// label with workspace suffix
444445
const lastIndexOfSquareBracket = recentLabel.lastIndexOf(' [', recentLabel.length - 2);
445446
if (lastIndexOfSquareBracket !== -1) {
446447
const split = splitName(recentLabel.substring(0, lastIndexOfSquareBracket));
447-
return { name: split.name, parentPath: split.parentPath + recentLabel.substring(lastIndexOfSquareBracket) };
448+
const remoteNameWithSpace = recentLabel.substring(lastIndexOfSquareBracket);
449+
return { name: split.name + remoteNameWithSpace, parentPath: split.parentPath };
448450
}
449451
}
450452
return splitName(recentLabel);

src/vs/base/common/platform.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,31 +75,8 @@ interface INavigator {
7575
}
7676
declare const navigator: INavigator;
7777

78-
// Web environment
79-
if (typeof navigator === 'object' && !isElectronRenderer) {
80-
_userAgent = navigator.userAgent;
81-
_isWindows = _userAgent.indexOf('Windows') >= 0;
82-
_isMacintosh = _userAgent.indexOf('Macintosh') >= 0;
83-
_isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
84-
_isLinux = _userAgent.indexOf('Linux') >= 0;
85-
_isMobile = _userAgent?.indexOf('Mobi') >= 0;
86-
_isWeb = true;
87-
88-
const configuredLocale = nls.getConfiguredDefaultLocale(
89-
// This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale`
90-
// to ensure that the NLS AMD Loader plugin has been loaded and configured.
91-
// This is because the loader plugin decides what the default locale is based on
92-
// how it's able to resolve the strings.
93-
nls.localize({ key: 'ensureLoaderPluginIsLoaded', comment: ['{Locked}'] }, '_')
94-
);
95-
96-
_locale = configuredLocale || LANGUAGE_DEFAULT;
97-
_language = _locale;
98-
_platformLocale = navigator.language;
99-
}
100-
10178
// Native environment
102-
else if (typeof nodeProcess === 'object') {
79+
if (typeof nodeProcess === 'object') {
10380
_isWindows = (nodeProcess.platform === 'win32');
10481
_isMacintosh = (nodeProcess.platform === 'darwin');
10582
_isLinux = (nodeProcess.platform === 'linux');
@@ -124,6 +101,29 @@ else if (typeof nodeProcess === 'object') {
124101
_isNative = true;
125102
}
126103

104+
// Web environment
105+
else if (typeof navigator === 'object' && !isElectronRenderer) {
106+
_userAgent = navigator.userAgent;
107+
_isWindows = _userAgent.indexOf('Windows') >= 0;
108+
_isMacintosh = _userAgent.indexOf('Macintosh') >= 0;
109+
_isIOS = (_userAgent.indexOf('Macintosh') >= 0 || _userAgent.indexOf('iPad') >= 0 || _userAgent.indexOf('iPhone') >= 0) && !!navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
110+
_isLinux = _userAgent.indexOf('Linux') >= 0;
111+
_isMobile = _userAgent?.indexOf('Mobi') >= 0;
112+
_isWeb = true;
113+
114+
const configuredLocale = nls.getConfiguredDefaultLocale(
115+
// This call _must_ be done in the file that calls `nls.getConfiguredDefaultLocale`
116+
// to ensure that the NLS AMD Loader plugin has been loaded and configured.
117+
// This is because the loader plugin decides what the default locale is based on
118+
// how it's able to resolve the strings.
119+
nls.localize({ key: 'ensureLoaderPluginIsLoaded', comment: ['{Locked}'] }, '_')
120+
);
121+
122+
_locale = configuredLocale || LANGUAGE_DEFAULT;
123+
_language = _locale;
124+
_platformLocale = navigator.language;
125+
}
126+
127127
// Unknown environment
128128
else {
129129
console.error('Unable to resolve platform.');

0 commit comments

Comments
 (0)