Skip to content

Commit

Permalink
much nicer method view panel
Browse files Browse the repository at this point in the history
  • Loading branch information
pfitzseb committed Jan 9, 2016
1 parent 95f934d commit 3cbf2ed
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/eval.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ module.exports =
[word, range] = @getWord editor
# if we only find numbers or nothing, return prematurely
if word.length == 0 || !isNaN(word) then return
client.msg type, {code: word}, ({result}) =>
view = if result.type then result.view else result
view = @ink.tree.fromJson(view)[0]
@ink.links.linkify view
r = @ink?.results.toggleUnderline editor, range,
content: view
clas: 'julia'
if type == 'docs'
client.msg type, {code: word}, ({result}) =>
view = if result.type then result.view else result
view = @ink.tree.fromJson(view)[0]
@ink.links.linkify view
r = @ink?.results.toggleUnderline editor, range,
content: view
clas: 'julia'
else
client.msg type, {code: word}, ({result}) =>
@ink.methodview.displayMethodView(result)

# gets the word and its range in the `editor` which the last cursor is on
getWord: (editor) ->
Expand Down

0 comments on commit 3cbf2ed

Please sign in to comment.