mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 16:08:24 +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
|
||||
|
||||
isOutsidePhantomToken: (column) ->
|
||||
!@tokens[0].isPhantom || column > @tokens[0].screenDelta
|
||||
return true unless @tokens[0].isPhantom
|
||||
|
||||
column > @tokens[0].screenDelta
|
||||
|
||||
isInsidePhantomToken: (column) ->
|
||||
@tokens[0].isPhantom && column < @tokens[0].screenDelta
|
||||
return false unless @tokens[0].isPhantom
|
||||
|
||||
column < @tokens[0].screenDelta
|
||||
|
||||
hasOnlyPhantomTokens: ->
|
||||
@tokens.length == 1 && @tokens[0].isPhantom
|
||||
|
Loading…
Reference in New Issue
Block a user