File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/vs/workbench/contrib/terminal/browser/links Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import type { ILinkProvider } from 'xterm ' ;
6
+ import { dispose } from 'vs/base/common/lifecycle ' ;
7
7
import { TerminalLink } from 'vs/workbench/contrib/terminal/browser/links/terminalLink' ;
8
+ import type { ILinkProvider } from 'xterm' ;
8
9
9
10
export abstract class TerminalBaseLinkProvider implements ILinkProvider {
10
11
private _activeLinks : TerminalLink [ ] | undefined ;
11
12
12
13
async provideLinks ( bufferLineNumber : number , callback : ( links : TerminalLink [ ] | undefined ) => void ) : Promise < void > {
13
- this . _activeLinks ?. forEach ( l => l . dispose ) ;
14
+ if ( this . _activeLinks ) {
15
+ dispose ( this . _activeLinks ) ;
16
+ }
14
17
this . _activeLinks = await this . _provideLinks ( bufferLineNumber ) ;
15
18
callback ( this . _activeLinks ) ;
16
19
}
You can’t perform that action at this time.
0 commit comments