mirror of
https://github.com/atom/atom.git
synced 2026-02-09 14:15:24 -05:00
Merge branch 'master' of github.com:github/atom
This commit is contained in:
@@ -24,10 +24,6 @@ class Atom
|
||||
$(document).on 'keydown', @handleKeyEvent
|
||||
@keymap.bindDefaultKeys()
|
||||
|
||||
destroy: ->
|
||||
$(document).off 'keydown', @handleKeyEvent
|
||||
@keymap.unbindDefaultKeys()
|
||||
|
||||
open: (path) ->
|
||||
$native.open path
|
||||
|
||||
|
||||
@@ -136,5 +136,5 @@ class Cursor extends View
|
||||
position = @editor.pixelPositionForScreenPosition(screenPosition)
|
||||
@css(position)
|
||||
|
||||
if @editor.getCursors().length == 1 or @editor.screenPositionInBounds(screenPosition)
|
||||
if this == _.last(@editor.getCursors())
|
||||
@editor.scrollTo(position)
|
||||
|
||||
@@ -37,7 +37,6 @@ class Editor extends View
|
||||
autoIndent: null
|
||||
lineCache: null
|
||||
isFocused: false
|
||||
isScrolling: false
|
||||
|
||||
initialize: ({buffer}) ->
|
||||
requireStylesheet 'editor.css'
|
||||
@@ -482,10 +481,7 @@ class Editor extends View
|
||||
@buffer.getMode()
|
||||
|
||||
scrollTo: (position) ->
|
||||
return if @isScrolling
|
||||
@isScrolling = true
|
||||
_.defer =>
|
||||
@isScrolling = false
|
||||
@scrollVertically(position)
|
||||
@scrollHorizontally(position)
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ class Keymap
|
||||
path = $native.openDialog()
|
||||
atom.open(path) if path
|
||||
|
||||
unbindDefaultKeys: ->
|
||||
$(document).unbind 'new-window', @_newWindow
|
||||
$(document).unbind 'open', @_open
|
||||
|
||||
bindKeys: (selector, bindings) ->
|
||||
@bindingSets.unshift(new BindingSet(selector, bindings))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user