mirror of
https://github.com/atom/atom.git
synced 2026-01-21 21:07:55 -05:00
Fix specs
This commit is contained in:
@@ -352,7 +352,7 @@ class Config
|
||||
if args.length is 2
|
||||
# observe(keyPath, callback)
|
||||
[keyPath, callback, scopeDescriptor, options] = args
|
||||
else if args.length is 3 and Array.isArray(scopeDescriptor)
|
||||
else if args.length is 3 and (Array.isArray(scopeDescriptor) or scopeDescriptor instanceof ScopeDescriptor)
|
||||
# observe(scopeDescriptor, keyPath, callback)
|
||||
[scopeDescriptor, keyPath, callback, options] = args
|
||||
else if args.length is 3 and _.isString(scopeDescriptor) and _.isObject(keyPath)
|
||||
|
||||
@@ -6,6 +6,7 @@ EmitterMixin = require('emissary').Emitter
|
||||
Serializable = require 'serializable'
|
||||
TokenizedLine = require './tokenized-line'
|
||||
Token = require './token'
|
||||
ScopeDescriptor = require './scope-descriptor'
|
||||
Grim = require 'grim'
|
||||
|
||||
module.exports =
|
||||
@@ -303,7 +304,7 @@ class TokenizedBuffer extends Model
|
||||
0
|
||||
|
||||
scopeDescriptorForPosition: (position) ->
|
||||
new ScopeDescriptor descriptor: @tokenForPosition(position).scopeDescriptor
|
||||
new ScopeDescriptor(descriptor: @tokenForPosition(position).scopeDescriptor)
|
||||
|
||||
tokenForPosition: (position) ->
|
||||
{row, column} = Point.fromObject(position)
|
||||
|
||||
Reference in New Issue
Block a user