mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-11 04:48:44 +03:00
Merge remote-tracking branch 'origin/master'
Conflicts: src/app/status-bar.coffee
This commit is contained in:
commit
25744fcd61
@ -17,7 +17,7 @@ describe "StatusBar", ->
|
||||
|
||||
# updating the status bar is asynchronous for performance reasons
|
||||
# for testing purposes, make it synchronous
|
||||
spyOn(_, 'defer').andCallFake (fn) -> fn()
|
||||
spyOn(_, 'delay').andCallFake (fn) -> fn()
|
||||
|
||||
afterEach ->
|
||||
rootView.remove()
|
||||
|
@ -36,15 +36,15 @@ class StatusBar extends View
|
||||
@updatePathText()
|
||||
|
||||
@updateCursorPositionText()
|
||||
@editor.on 'cursor-move', => _.defer => @updateCursorPositionText()
|
||||
@editor.on 'cursor-move', => _.delay (=> @updateCursorPositionText()), 50
|
||||
|
||||
@subscribeToBuffer()
|
||||
|
||||
subscribeToBuffer: ->
|
||||
@buffer?.off '.status-bar'
|
||||
@buffer = @editor.getBuffer()
|
||||
@buffer.on 'change.status-bar', => _.defer => @updateBufferModifiedText()
|
||||
@buffer.on 'after-save.status-bar', => _.defer => @updateStatusBar()
|
||||
@buffer.on 'change.status-bar', => _.delay (=> @updateBufferModifiedText()), 50
|
||||
@buffer.on 'after-save.status-bar', => _.delay (=> @updateStatusBar()), 50
|
||||
@updateStatusBar()
|
||||
|
||||
updateStatusBar: ->
|
||||
|
Loading…
Reference in New Issue
Block a user