mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Merge pull request #1095 from atom/ks-solo
Use non-replicated telepath strings
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
"season": "0.14.0",
|
||||
"semver": "1.1.4",
|
||||
"space-pen": "2.0.0",
|
||||
"telepath": "0.21.0",
|
||||
"telepath": "0.23.0",
|
||||
"temp": "0.5.0",
|
||||
"underscore-plus": "0.2.0"
|
||||
},
|
||||
|
||||
@@ -179,15 +179,18 @@ class RootView extends View
|
||||
editSession = activePane.itemForUri(project.relativize(filePath)) if activePane and filePath
|
||||
promise = project.open(filePath, {initialLine}) if not editSession
|
||||
|
||||
Q(editSession ? promise).then (editSession) =>
|
||||
if not activePane
|
||||
activePane = new Pane(editSession)
|
||||
@panes.setRoot(activePane)
|
||||
Q(editSession ? promise)
|
||||
.then (editSession) =>
|
||||
if not activePane
|
||||
activePane = new Pane(editSession)
|
||||
@panes.setRoot(activePane)
|
||||
|
||||
activePane.showItem(editSession)
|
||||
activePane.focus() if changeFocus
|
||||
@trigger "uri-opened"
|
||||
editSession
|
||||
activePane.showItem(editSession)
|
||||
activePane.focus() if changeFocus
|
||||
@trigger "uri-opened"
|
||||
editSession
|
||||
.catch (error) ->
|
||||
console.error(error.stack ? error)
|
||||
|
||||
# Private: Only used in specs
|
||||
openSync: (uri, {changeFocus, initialLine, pane, split}={}) ->
|
||||
|
||||
@@ -50,7 +50,7 @@ class TextBuffer
|
||||
@useSerializedText = @state.get('isModified') != false
|
||||
else
|
||||
{@project, filePath} = optionsOrState
|
||||
@text = new telepath.MutableString(initialText ? '')
|
||||
@text = new telepath.String(initialText ? '', replicated: false)
|
||||
@id = guid.create().toString()
|
||||
@state = site.createDocument
|
||||
id: @id
|
||||
|
||||
Reference in New Issue
Block a user