From 0e0eeb34263fcb3d574614dc17701cec2eeba3b4 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 19 Mar 2015 12:23:10 +0100 Subject: [PATCH] :fire: Delete TokenizedLine#isColumnOutsideIndentation --- src/tokenized-line.coffee | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tokenized-line.coffee b/src/tokenized-line.coffee index 489714ae3..b62ab316f 100644 --- a/src/tokenized-line.coffee +++ b/src/tokenized-line.coffee @@ -97,6 +97,7 @@ class TokenizedLine # Returns a {Number} representing the `line` position where the wrap would take place. # Returns `null` if a wrap wouldn't occur. findWrapColumn: (maxColumn) -> + return unless maxColumn? return unless @text.length > maxColumn if /\s/.test(@text[maxColumn]) @@ -107,7 +108,7 @@ class TokenizedLine return @text.length else # search backward for the start of the word on the boundary - for column in [maxColumn..0] when @isColumnOutsideIndentation(column) + for column in [maxColumn..@firstNonWhitespaceIndex] return column + 1 if /\s/.test(@text[column]) return maxColumn @@ -162,9 +163,6 @@ class TokenizedLine isSoftWrapped: -> @lineEnding is null - isColumnOutsideIndentation: (column) -> - column >= @firstNonWhitespaceIndex - isColumnInsideSoftWrapIndentation: (column) -> return false if @softWrapIndentationTokens.length == 0