Use intention-revealing method names

This commit is contained in:
Antonio Scandurra 2015-02-16 15:11:57 +01:00
parent abd143a255
commit 131048af65
2 changed files with 5 additions and 2 deletions

View File

@ -844,7 +844,7 @@ class DisplayBuffer extends Model
column = @screenLines[row].clipScreenColumn(0)
else
column = screenLine.clipScreenColumn(maxScreenColumn - 1)
else if screenLine.tokens[0].isPhantom and column < screenLine.tokens[0].screenDelta
else if screenLine.isInsidePhantomToken(column)
row--
column = @screenLines[row].getMaxScreenColumn()
else if wrapBeyondNewlines and column > maxScreenColumn and row < @getLastRow()

View File

@ -125,7 +125,10 @@ class TokenizedLine
@lineEnding is null
isOutsidePhantomToken: (column) ->
!@tokens[0].isPhantom || column > @tokens[0].screenDelta
@tokens[0].isPhantom && column > @tokens[0].screenDelta
isInsidePhantomToken: (column) ->
@tokens[0].isPhantom && column < @tokens[0].screenDelta
tokenAtBufferColumn: (bufferColumn) ->
@tokens[@tokenIndexAtBufferColumn(bufferColumn)]