Skip to content

Commit b411fb2

Browse files
committed
Fix majority of terminal line/column cases
Part of microsoft#34193
1 parent 35c8bc4 commit b411fb2

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const lineAndColumnClause = [
4141

4242
// Changing any regex may effect this value, hence changes this as well if required.
4343
const winLineAndColumnMatchIndex = 12;
44-
const unixLineAndColumnMatchIndex = 15;
44+
const unixLineAndColumnMatchIndex = 23;
4545

4646
// Each line and column clause have 6 groups (ie no. of expressions in round brackets)
4747
const lineAndColumnClauseGroupCount = 6;

src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,16 @@ suite('Workbench - TerminalLinkHandler', () => {
138138
// { urlFormat: '{0} on line {1}, column {2}', line: '5', column: '3' },
139139
// { urlFormat: '{0}:line {1}', line: '5' },
140140
// { urlFormat: '{0}:line {1}, column {2}', line: '5', column: '3' },
141-
// { urlFormat: '{0}({1})', line: '5' },
142-
// { urlFormat: '{0} ({1})', line: '5' },
143-
// { urlFormat: '{0}({1},{2})', line: '5', column: '3' },
144-
// { urlFormat: '{0} ({1},{2})', line: '5', column: '3' },
145-
// { urlFormat: '{0}:{1}', line: '5' },
146-
// { urlFormat: '{0}:{1}:{2}', line: '5', column: '3' },
147-
// { urlFormat: '{0}[{1}]', line: '5' },
148-
// { urlFormat: '{0} [{1}]', line: '5' },
149-
// { urlFormat: '{0}[{1},{2}]', line: '5', column: '3' },
150-
// { urlFormat: '{0} [{1},{2}]', line: '5', column: '3' }
141+
{ urlFormat: '{0}({1})', line: '5' },
142+
{ urlFormat: '{0} ({1})', line: '5' },
143+
{ urlFormat: '{0}({1},{2})', line: '5', column: '3' },
144+
{ urlFormat: '{0} ({1},{2})', line: '5', column: '3' },
145+
{ urlFormat: '{0}:{1}', line: '5' },
146+
{ urlFormat: '{0}:{1}:{2}', line: '5', column: '3' },
147+
{ urlFormat: '{0}[{1}]', line: '5' },
148+
{ urlFormat: '{0} [{1}]', line: '5' },
149+
{ urlFormat: '{0}[{1},{2}]', line: '5', column: '3' },
150+
{ urlFormat: '{0} [{1},{2}]', line: '5', column: '3' }
151151
];
152152

153153
linkUrls.forEach(linkUrl => {

0 commit comments

Comments
 (0)