Skip to content

Commit

Permalink
Fix switch pane issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Metzdorf committed Jun 30, 2015
1 parent 777da59 commit d33e616
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/file-info-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class FileInfoView extends HTMLElement
@bufferModified.classList.add('buffer-modified')
@appendChild(@bufferModified)


@myTip = atom.tooltips.add(this,
title: 'Copied: '+@getActiveItem()?.getPath?()
trigger: 'click'
Expand All @@ -27,9 +28,9 @@ class FileInfoView extends HTMLElement
getPath = @getActiveItem()?.getPath?()
atom.clipboard.write(getPath)
setTimeout =>
@myTip.dispose()
@myTip?.dispose()
@myTip = atom.tooltips.add(this,
title: 'Copied: '+getPath
title: 'Copied: '+@getActiveItem()?.getPath?()
trigger: 'click'
delay:
show: 0
Expand Down Expand Up @@ -63,13 +64,20 @@ class FileInfoView extends HTMLElement
@titleSubscription?.dispose()
@modifiedSubscription?.dispose()
@clickSubscription?.dispose()
@tempTip?.dispose()
@myTip?.dispose()

getActiveItem: ->
atom.workspace.getActivePaneItem()

update: ->
@updatePathText()
@myTip?.dispose()
@myTip = atom.tooltips.add(this,
title: 'Copied: '+@getActiveItem()?.getPath?()
trigger: 'click'
delay:
show: 0
)
@updateBufferHasModifiedText(@getActiveItem()?.isModified?())

updateBufferHasModifiedText: (isModified) ->
Expand Down

0 comments on commit d33e616

Please sign in to comment.