Skip to content

Commit 2c5e412

Browse files
authored
Merge pull request #280 from dustinrb/result-blocks
Adds option to display results as blocks
2 parents 71c73a4 + 8c6db0b commit 2c5e412

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/package/config.coffee

+8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ config =
5151
description: "Limits the Console history's size."
5252
default: 10000
5353
order: 8
54+
resultsDisplayMode:
55+
type: 'string'
56+
default: 'inline'
57+
enum: [
58+
{value:'inline', description:'Float results next to code'}
59+
{value:'block', description:'Display results under code'}
60+
]
61+
order: 10
5462

5563
if process.platform != 'darwin'
5664
config.terminal =

lib/runtime/evaluation.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ module.exports =
2323
[[start], [end]] = range
2424
@ink.highlight editor, start, end
2525
r = null
26-
setTimeout (=> r ?= new @ink.Result editor, [start, end]), 0.1
26+
setTimeout (=> r ?= new @ink.Result editor, [start, end], type: atom.config.get 'julia-client.resultsDisplayMode'), 0.1
2727
evaluate({text, line: line+1, mod, path: edpath})
2828
.then (result) =>
2929
error = result.type == 'error'
3030
view = if error then result.view else result
31-
if not r? or r.isDestroyed then r = new @ink.Result editor, [start, end]
31+
if not r? or r.isDestroyed then r = new @ink.Result editor, [start, end], type: atom.config.get 'julia-client.resultsDisplayMode'
3232
registerLazy = (id) ->
3333
r.onDidDestroy client.withCurrent -> clearLazy [id]
3434
editor.onDidDestroy client.withCurrent -> clearLazy id

0 commit comments

Comments
 (0)