Skip to content

Commit 26a4e6e

Browse files
committed
improve repl module detection speed
1 parent 1b4edbe commit 26a4e6e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/runtime/modules.coffee

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{client} = require '../connection'
77
{selector} = require '../ui'
88

9-
{module: getmodule, allmodules} = client.import ['module', 'allmodules']
9+
{module: getmodule, allmodules, ismodule} = client.import ['module', 'allmodules', 'ismodule']
1010

1111
module.exports =
1212

@@ -83,9 +83,9 @@ module.exports =
8383
else if atom.workspace.isTextEditor item
8484
@updateForEditor item
8585
else
86-
allmodules().then (modules) =>
87-
mod = item.juliaModule or 'Main'
88-
@setCurrent main: mod, inactive: !(modules.indexOf(mod) > -1)
86+
mod = item.juliaModule or 'Main'
87+
ismodule(mod).then (ismod) =>
88+
@setCurrent main: mod, inactive: !ismod
8989

9090
updateForEditor: (editor) ->
9191
@setCurrent main: editor.juliaModule or 'Main', true

script/boot_repl.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ end
2626

2727

2828
# TODO: Update me when tagging a new relase:
29-
MIN_ATOM_VER = v"0.12"
29+
MIN_ATOM_VER = v"0.12.4"
3030
outdated = false
3131

3232
try

0 commit comments

Comments
 (0)