mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
🎨
This commit is contained in:
@@ -122,10 +122,10 @@ describe "PaneView", ->
|
||||
beforeEach ->
|
||||
paneModel.activateItem(editor1)
|
||||
|
||||
it "adds its file path to the active pane", ->
|
||||
it "adds the file path as a data attribute to the pane", ->
|
||||
expect(pane).toHaveAttr('data-active-item-path')
|
||||
|
||||
it "adds its file name to the active pane", ->
|
||||
it "adds the file name as a data attribute to the pane", ->
|
||||
expect(pane).toHaveAttr('data-active-item-name')
|
||||
|
||||
describe "when the new activeItem does not implement ::getPath", ->
|
||||
@@ -133,10 +133,10 @@ describe "PaneView", ->
|
||||
paneModel.activateItem(editor1)
|
||||
paneModel.activateItem(document.createElement('div'))
|
||||
|
||||
it "removes its file path from the active pane", ->
|
||||
it "does not add the file path as a data attribute to the pane", ->
|
||||
expect(pane).not.toHaveAttr('data-active-item-path')
|
||||
|
||||
it "removes its file name from the active pane", ->
|
||||
it "does not add the file name as data attribute to the pane", ->
|
||||
expect(pane).not.toHaveAttr('data-active-item-name')
|
||||
|
||||
describe "when an item is destroyed", ->
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
path = require 'path'
|
||||
{CompositeDisposable} = require 'event-kit'
|
||||
Grim = require 'grim'
|
||||
{$, callAttachHooks, callRemoveHooks} = require './space-pen-extensions'
|
||||
@@ -72,7 +73,6 @@ class PaneElement extends HTMLElement
|
||||
itemView = atom.views.getView(item)
|
||||
|
||||
if itemPath = item.getPath?()
|
||||
path = require 'path'
|
||||
@dataset.activeItemName = path.basename(itemPath)
|
||||
@dataset.activeItemPath = itemPath
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user