mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Simplified method to check active file
Updated the "detectActiveFile" method to be more simple and straightforward. Thanks to @lodenrogue suggestion!
This commit is contained in:
@@ -811,14 +811,8 @@ export class Repository implements Disposable {
|
||||
this._onDidChangeStatus.fire();
|
||||
}
|
||||
|
||||
private detectActiveFile(fullFilePath: string): boolean {
|
||||
if (window.activeTextEditor !== undefined) {
|
||||
if (window.activeTextEditor.document.fileName === fullFilePath) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
private detectActiveFile(fullFilePath: string): boolean | undefined {
|
||||
return window.activeTextEditor && window.activeTextEditor.document.fileName === fullFilePath;
|
||||
}
|
||||
|
||||
private onFSChange(uri: Uri): void {
|
||||
|
||||
Reference in New Issue
Block a user