Skip to content

Commit

Permalink
Fixed VSCodeVim#2688. Revert "Removed viewcolumn from editoridentity …
Browse files Browse the repository at this point in the history
…information"

This reverts commit 1c81cf3.
  • Loading branch information
lukaszb committed Jun 11, 2018
1 parent 5817647 commit 70d7ca4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/editorIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,30 @@ 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;
return this.fileName === other.fileName && this.viewColumn === other.viewColumn;
}

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

0 comments on commit 70d7ca4

Please sign in to comment.