From 70d7ca4f834545eb965bdadb980b22b3517e0b60 Mon Sep 17 00:00:00 2001 From: Lukasz Balcerzak Date: Mon, 11 Jun 2018 10:13:04 +0200 Subject: [PATCH] Fixed #2688. Revert "Removed viewcolumn from editoridentity information" This reverts commit 1c81cf3e657320a015e911ceee3fd07b0a6dda4c. --- src/editorIdentity.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/editorIdentity.ts b/src/editorIdentity.ts index 0a2efcec028..51999774254 100644 --- a/src/editorIdentity.ts +++ b/src/editorIdentity.ts @@ -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; } }