mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Make changes from kevin for clarity
This commit is contained in:
parent
87fb07e657
commit
35ffdb8bf9
@ -214,8 +214,9 @@ describe "RootView", ->
|
||||
|
||||
it "can create multiple empty edit sessions as an item on a new pane", ->
|
||||
editSession = rootView.open()
|
||||
editSession = rootView.open()
|
||||
editSession2 = rootView.open()
|
||||
expect(rootView.getActivePane().getItems().length).toBe 2
|
||||
expect(editSession).not.toBe editSession2
|
||||
|
||||
describe "when called with a path", ->
|
||||
it "creates an edit session for the given path as an item on a new pane, and focuses the pane", ->
|
||||
|
@ -173,8 +173,8 @@ class RootView extends View
|
||||
initialLine = options.initialLine
|
||||
path = project.relativize(path)
|
||||
if activePane = @getActivePane()
|
||||
editSession = activePane.itemForUri(path)
|
||||
editSession = project.open(path, {initialLine}) unless path and editSession
|
||||
editSession = activePane.itemForUri(path) if path
|
||||
editSession ?= project.open(path, {initialLine})
|
||||
activePane.showItem(editSession)
|
||||
else
|
||||
editSession = project.open(path, {initialLine})
|
||||
|
Loading…
Reference in New Issue
Block a user