Skip to content

Commit 3dee629

Browse files
authored
Merge branch 'microsoft:main' into head-swordfish
2 parents 1affae0 + 61a0c21 commit 3dee629

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/vs/platform/quickinput/browser/quickPickPin.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function _formatPinnedItems(storageKey: string, quickPick: IQuickPick<IQuickPick
7777
}
7878

7979
function getItemIdentifier(item: QuickPickItem): string {
80-
return item.type === 'separator' ? '' : item.id || `${item.label}${item.description}${item.detail}}`;
80+
return item.type === 'separator' ? '' : item.id || `${item.label}${item.description}${item.detail}`;
8181
}
8282

8383
function updateButtons(item: QuickPickItem, removePin: boolean): void {
@@ -107,11 +107,19 @@ function updatePinnedItems(storageKey: string, changedItem: IQuickPickItem, stor
107107
} else {
108108
items.push(changedItem);
109109
}
110-
storageService.store(storageKey, JSON.stringify(items), StorageScope.WORKSPACE, StorageTarget.MACHINE);
110+
storageService.store(storageKey, JSON.stringify(items.map(formatPinnedItemForStorage)), StorageScope.WORKSPACE, StorageTarget.MACHINE);
111111
return items;
112112
}
113113

114114
function getPinnedItems(storageKey: string, storageService: IStorageService): IQuickPickItem[] {
115115
const items = storageService.get(storageKey, StorageScope.WORKSPACE);
116116
return items ? JSON.parse(items) : [];
117117
}
118+
119+
function formatPinnedItemForStorage(item: IQuickPickItem): IQuickPickItem {
120+
return {
121+
label: item.label,
122+
description: item.description,
123+
detail: item.detail,
124+
};
125+
}

src/vs/workbench/contrib/terminal/browser/terminalActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export const terminalSendSequenceCommand = async (accessor: ServicesAccessor, ar
135135
if (!text) {
136136
text = await quickInputService.input({
137137
value: '',
138-
placeHolder: 'Enter sequence to send (supports \\n, \\r, \\x{AB})',
138+
placeHolder: 'Enter sequence to send (supports \\n, \\r, \\xAB)',
139139
prompt: localize('workbench.action.terminal.sendSequence.prompt', "Enter sequence to send to the terminal"),
140140
});
141141
if (!text) {

src/vs/workbench/contrib/terminalContrib/developer/browser/terminal.developer.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ registerTerminalAction({
7575
}
7676
const data = await quickInputService.input({
7777
value: '',
78-
placeHolder: 'Enter data, use \\x to escape',
78+
placeHolder: 'Enter data (supports \\n, \\r, \\xAB)',
7979
prompt: localize('workbench.action.terminal.writeDataToTerminal.prompt', "Enter data to write directly to the terminal, bypassing the pty"),
8080
});
8181
if (!data) {

0 commit comments

Comments
 (0)