Skip to content

Commit a95252e

Browse files
committed
Collapse 3+ spaces into middle ellipsis
Part of microsoft#158120
1 parent eaa6485 commit a95252e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,12 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
869869
commandMap.add(executingCommand);
870870
}
871871
function formatLabel(label: string) {
872-
return label.replace(/\r?\n/g, '\u23CE');
872+
return label
873+
// Replace new lines with "enter" symbol
874+
.replace(/\r?\n/g, '\u23CE')
875+
// Replace 3 or more spaces with midline horizontal ellipsis which looks similar
876+
// to whitespace in the editor
877+
.replace(/\s\s\s+/g, '\u22EF');
873878
}
874879
if (commands && commands.length > 0) {
875880
for (const entry of commands) {

0 commit comments

Comments
 (0)