Skip to content

Commit 849fe86

Browse files
committed
fix toggleDocs
1 parent 083f068 commit 849fe86

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/runtime/evaluation.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ module.exports =
8484
notifications.show "Evaluation Finished"
8585
workspace.update()
8686

87-
toggleDocs: (word, range) ->
87+
toggleDocs: () ->
8888
{ editor, mod, edpath } = @_currentContext()
89+
bufferPosition = editor.getLastCursor().getBufferPosition()
8990
# get word without trailing dot accessors at the buffer position
90-
{ word, range } = words.getWordAndRange(editor) unless word? and range?
91+
{ word, range } = words.getWordAndRange(editor, { bufferPosition })
9192
range = words.getWordRangeWithoutTrailingDots(word, range, bufferPosition)
9293
word = editor.getTextInBufferRange(range)
9394

0 commit comments

Comments
 (0)