mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
🔥 Nuke Cursor deprecations
This commit is contained in:
committed by
Nathan Sobo
parent
cc4ee92699
commit
3ba594a542
@@ -1,7 +1,6 @@
|
||||
{Point, Range} = require 'text-buffer'
|
||||
{Emitter} = require 'event-kit'
|
||||
_ = require 'underscore-plus'
|
||||
Grim = require 'grim'
|
||||
Model = require './model'
|
||||
|
||||
# Extended: The `Cursor` class represents the little blinking line identifying
|
||||
@@ -62,18 +61,6 @@ class Cursor extends Model
|
||||
onDidChangeVisibility: (callback) ->
|
||||
@emitter.on 'did-change-visibility', callback
|
||||
|
||||
on: (eventName) ->
|
||||
return unless Grim.includeDeprecatedAPIs
|
||||
|
||||
switch eventName
|
||||
when 'moved'
|
||||
Grim.deprecate("Use Cursor::onDidChangePosition instead")
|
||||
when 'destroyed'
|
||||
Grim.deprecate("Use Cursor::onDidDestroy instead")
|
||||
else
|
||||
Grim.deprecate("::on is no longer supported. Use the event subscription methods instead")
|
||||
super
|
||||
|
||||
###
|
||||
Section: Managing Cursor Position
|
||||
###
|
||||
@@ -578,7 +565,6 @@ class Cursor extends Model
|
||||
setVisible: (visible) ->
|
||||
if @visible isnt visible
|
||||
@visible = visible
|
||||
@emit 'visibility-changed', @visible if Grim.includeDeprecatedAPIs
|
||||
@emitter.emit 'did-change-visibility', @visible
|
||||
|
||||
# Public: Returns the visibility of the cursor.
|
||||
@@ -698,12 +684,3 @@ class Cursor extends Model
|
||||
position = range.start
|
||||
stop()
|
||||
position
|
||||
|
||||
if Grim.includeDeprecatedAPIs
|
||||
Cursor::getScopes = ->
|
||||
Grim.deprecate 'Use Cursor::getScopeDescriptor() instead'
|
||||
@getScopeDescriptor().getScopesArray()
|
||||
|
||||
Cursor::getMoveNextWordBoundaryBufferPosition = (options) ->
|
||||
Grim.deprecate 'Use `::getNextWordBoundaryBufferPosition(options)` instead'
|
||||
@getNextWordBoundaryBufferPosition(options)
|
||||
|
||||
Reference in New Issue
Block a user