From 0bcfa591f6b2fb497b7809f2b3939c7f45a469d5 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 6 Nov 2014 12:54:07 -0700 Subject: [PATCH] Always throw exceptions when translating rows on destroyed DisplayBuffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously we only threw exceptions on non-release builds, but we haven’t seen bundled packages cause issues in a while. Time to see what third party packages cause problems. Refs #3192 --- src/display-buffer.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/display-buffer.coffee b/src/display-buffer.coffee index f3a35264a..f32b0171e 100644 --- a/src/display-buffer.coffee +++ b/src/display-buffer.coffee @@ -735,9 +735,7 @@ class DisplayBuffer extends Model # # Returns a {Point}. screenPositionForBufferPosition: (bufferPosition, options) -> - # TODO: Expand this exception to cover all versions once we burn it in on non-release builds - if @isDestroyed() and not atom.isReleasedVersion() - throw new Error("This TextEditor has been destroyed") + throw new Error("This TextEditor has been destroyed") if @isDestroyed() { row, column } = @buffer.clipPosition(bufferPosition) [startScreenRow, endScreenRow] = @rowMap.screenRowRangeForBufferRow(row)