Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lib/runtime/goto.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { getLocalContext } from '../misc/blocks'
const {
gotosymbol: gotoSymbol,
regeneratesymbols: regenerateSymbols,
} = client.import(['gotosymbol', 'regeneratesymbols'])
clearsymbols: clearSymbols,
} = client.import(['gotosymbol', 'regeneratesymbols', 'clearsymbols'])

const includeRegex = /(include|include_dependency)\(".+\.jl"\)/
const filePathRegex = /".+\.jl"/
Expand All @@ -23,8 +24,11 @@ class Goto {
this.ink = ink
this.subscriptions = new CompositeDisposable()
this.subscriptions.add(
atom.commands.add('atom-workspace', 'julia-client:regenerate-symbol-cache', () => {
atom.commands.add('atom-workspace', 'julia-client:regenerate-symbols-cache', () => {
regenerateSymbols()
}),
atom.commands.add('atom-workspace', 'julia-client:clear-symbols-cache', () => {
clearSymbols()
})
)
}
Expand Down Expand Up @@ -85,7 +89,7 @@ class Goto {

gotoSymbol({
word,
path: editor.getPath(),
path: editor.getPath() || 'untitled-' + editor.getBuffer().getId(),
// local context
column: column + 1,
row: row + 1,
Expand Down Expand Up @@ -142,7 +146,7 @@ class Goto {
return new Promise((resolve, reject) => {
gotoSymbol({
word,
path: textEditor.getPath(),
path: textEditor.getPath() || 'untitled-' + textEditor.getBuffer().getId(),
// local context
column: column + 1,
row: row + 1,
Expand Down
2 changes: 1 addition & 1 deletion lib/runtime/outline.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function updateEditor (editor, options = {
const text = editor.getText()
const currentModule = modules.current()
const mod = currentModule ? currentModule : 'Main'
const path = editor.getPath()
const path = editor.getPath() || 'untitled-' + editor.getBuffer().getId()
return updateeditor({
text,
mod,
Expand Down