Skip to content

Commit 3c4f7ed

Browse files
authored
PR titles cropped unnecessa... (#8466)
Fixes #8453
1 parent 64262a1 commit 3c4f7ed

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/common/settingKeys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const OPEN_VIEW = 'openView';
9494
// Workbench
9595
export const WORKBENCH = 'workbench';
9696
export const COLOR_THEME = 'colorTheme';
97+
export const LIST_HORIZONTAL_SCROLLING = 'list.horizontalScrolling';
9798

9899
// Chat
99100
export const CHAT_SETTINGS_NAMESPACE = 'chat';

src/view/treeNodes/pullRequestNode.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { COPILOT_ACCOUNTS } from '../../common/comment';
1010
import { getCommentingRanges } from '../../common/commentingRanges';
1111
import { InMemFileChange, SlimFileChange } from '../../common/file';
1212
import Logger from '../../common/logger';
13-
import { FILE_LIST_LAYOUT, PR_SETTINGS_NAMESPACE, SHOW_PULL_REQUEST_NUMBER_IN_TREE } from '../../common/settingKeys';
13+
import { FILE_LIST_LAYOUT, LIST_HORIZONTAL_SCROLLING, PR_SETTINGS_NAMESPACE, SHOW_PULL_REQUEST_NUMBER_IN_TREE, WORKBENCH } from '../../common/settingKeys';
1414
import { createPRNodeUri, DataUri, fromPRUri, Schemes } from '../../common/uri';
1515
import { FolderRepositoryManager } from '../../github/folderRepositoryManager';
1616
import { CopilotWorkingStatus } from '../../github/githubRepository';
@@ -323,7 +323,8 @@ export class PRNode extends TreeNode implements vscode.CommentingRangeProvider2
323323
label += `#${number}: `;
324324
}
325325

326-
let labelTitle = title.length > 50 ? `${title.substring(0, 50)}...` : title;
326+
const horizontalScrolling = vscode.workspace.getConfiguration(WORKBENCH).get<boolean>(LIST_HORIZONTAL_SCROLLING, false);
327+
let labelTitle = (horizontalScrolling && title.length > 50) ? `${title.substring(0, 50)}...` : title;
327328
if (COPILOT_ACCOUNTS[author.login]) {
328329
labelTitle = labelTitle.replace('[WIP]', '');
329330
}

0 commit comments

Comments
 (0)