Skip to content

Commit

Permalink
add cursorpos handler
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Feb 20, 2018
1 parent 3d82170 commit 78fb03d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 1 addition & 2 deletions lib/connection/process/cycler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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
Expand Down
13 changes: 7 additions & 6 deletions lib/runtime/console2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 78fb03d

Please sign in to comment.