Merge pull request #1095 from atom/ks-solo

Use non-replicated telepath strings
This commit is contained in:
Kevin Sawicki
2013-11-07 10:13:50 -08:00
3 changed files with 13 additions and 10 deletions

View File

@@ -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"
},

View File

@@ -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}={}) ->

View File

@@ -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