Skip to content

Commit

Permalink
Removed viewcolumn from editoridentity information
Browse files Browse the repository at this point in the history
  • Loading branch information
Chillee committed Apr 23, 2018
1 parent 2d8c62d commit 1c81cf3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/editorIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,25 @@ import * as vscode from 'vscode';

export class EditorIdentity {
private _fileName: string;
private _viewColumn: vscode.ViewColumn;

constructor(textEditor?: vscode.TextEditor) {
this._fileName = (textEditor && textEditor.document && textEditor.document.fileName) || '';
this._viewColumn = (textEditor && textEditor.viewColumn) || vscode.ViewColumn.One;
}

get fileName() {
return this._fileName;
}

get viewColumn() {
return this._viewColumn;
}

public hasSameBuffer(identity: EditorIdentity): boolean {
return this.fileName === identity.fileName;
}

public isEqual(other: EditorIdentity): boolean {
return this.fileName === other.fileName && this.viewColumn === other.viewColumn;
return this.fileName === other.fileName;
}

public toString() {
return this.fileName + this.viewColumn;
return this.fileName;
}
}

0 comments on commit 1c81cf3

Please sign in to comment.