mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 12:33:35 +01:00
SCM - use subject as the title of the multi-file diff editor (#269347)
This commit is contained in:
@@ -295,6 +295,11 @@ export function truncate(value: string, maxLength = 20, ellipsis = true): string
|
||||
return value.length <= maxLength ? value : `${value.substring(0, maxLength)}${ellipsis ? '\u2026' : ''}`;
|
||||
}
|
||||
|
||||
export function subject(value: string): string {
|
||||
const index = value.indexOf('\n');
|
||||
return index === -1 ? value : truncate(value, index, false);
|
||||
}
|
||||
|
||||
function normalizePath(path: string): string {
|
||||
// Windows & Mac are currently being handled
|
||||
// as case insensitive file systems in VS Code.
|
||||
|
||||
Reference in New Issue
Block a user