diff --git a/lib/connection/process/cycler.coffee b/lib/connection/process/cycler.coffee index ec8f821c..be946f59 100644 --- a/lib/connection/process/cycler.coffee +++ b/lib/connection/process/cycler.coffee @@ -66,7 +66,6 @@ module.exports = boot: (ipc) -> ipc.rpc 'ping' console: (ipc) -> ipc.rpc 'evalrepl', {code: 'Void()'} - editor: (ipc) -> ipc.rpc 'eval', {text: '2+2', mod: 'Main', line: 1, path: 'untitled'} completions: (ipc) -> ipc.rpc 'cacheCompletions', 'Main' warmup: (obj) -> @@ -75,7 +74,7 @@ module.exports = .then (sock) => return unless obj.cached ipc = new IPC sock - [@boot, @console, @editor, @completions].forEach (f) -> + [@boot, @console, @completions].forEach (f) -> obj.init = obj.init.then -> if obj.cached then f ipc obj.init = obj.init diff --git a/lib/runtime/console2.js b/lib/runtime/console2.js index b0d48afe..760ac900 100644 --- a/lib/runtime/console2.js +++ b/lib/runtime/console2.js @@ -34,8 +34,13 @@ export function activate (ink) { modules.onDidChange(debounce(() => changemodule({mod: modules.current(), cols: terminal.terminal.cols}), 200)) - let linkHandler + client.handle({ + updateWorkspace: () => require('./workspace').update(), + clearconsole: () => terminal.clear(), + cursorpos: () => [terminal.terminal.buffer.x, terminal.terminal.buffer.y] + }) + let linkHandler client.onBoot((proc) => { terminal.attach(proc.ty) @@ -82,11 +87,7 @@ export function activate (ink) { terminal.write('\x1b[1m\r\x1b[31mJulia has exited.\x1b[0m Press Enter to start a new session.\n\r') terminal.terminal.deregisterLinkMatcher(linkHandler) }) - - client.handle({ - updateWorkspace: () => require('./workspace').update(), - clearconsole: () => terminal.clear() - }) + subs.add(atom.commands.add('atom-workspace', 'julia-client:open-console', () => { terminal.open().then(() => terminal.show())