mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
Use guard clauses, instead of crappy ANDs
This commit is contained in:
parent
e62e26a3c2
commit
88ca44d53b
@ -125,10 +125,14 @@ class TokenizedLine
|
|||||||
@lineEnding is null
|
@lineEnding is null
|
||||||
|
|
||||||
isOutsidePhantomToken: (column) ->
|
isOutsidePhantomToken: (column) ->
|
||||||
!@tokens[0].isPhantom || column > @tokens[0].screenDelta
|
return true unless @tokens[0].isPhantom
|
||||||
|
|
||||||
|
column > @tokens[0].screenDelta
|
||||||
|
|
||||||
isInsidePhantomToken: (column) ->
|
isInsidePhantomToken: (column) ->
|
||||||
@tokens[0].isPhantom && column < @tokens[0].screenDelta
|
return false unless @tokens[0].isPhantom
|
||||||
|
|
||||||
|
column < @tokens[0].screenDelta
|
||||||
|
|
||||||
hasOnlyPhantomTokens: ->
|
hasOnlyPhantomTokens: ->
|
||||||
@tokens.length == 1 && @tokens[0].isPhantom
|
@tokens.length == 1 && @tokens[0].isPhantom
|
||||||
|
Loading…
Reference in New Issue
Block a user