mirror of
https://github.com/atom/atom.git
synced 2026-02-02 10:45:14 -05:00
Don't cancel on delay when no tags exist
Instead just show the error until explicitly cancelled so the behavior when no tags is the same as the behavior when no tags match the current filter.
This commit is contained in:
@@ -46,13 +46,10 @@ class SymbolsView extends SelectList
|
||||
@setLoading("Generating symbols...")
|
||||
new TagGenerator(path).generate().done (tags) =>
|
||||
if tags.length > 0
|
||||
@miniEditor.show()
|
||||
@maxItem = Infinity
|
||||
@setArray(tags)
|
||||
else
|
||||
@miniEditor.hide()
|
||||
@setError("No symbols found")
|
||||
setTimeout (=> @cancel()), 2000
|
||||
|
||||
toggleProjectSymbols: ->
|
||||
if @hasParent()
|
||||
@@ -72,7 +69,6 @@ class SymbolsView extends SelectList
|
||||
else
|
||||
@miniEditor.hide()
|
||||
@setError("No symbols found")
|
||||
setTimeout (=> @cancel()), 2000
|
||||
|
||||
confirmed : (tag) ->
|
||||
if tag.file and not fsUtils.isFile(project.resolve(tag.file))
|
||||
|
||||
@@ -74,7 +74,7 @@ describe "SymbolsView", ->
|
||||
setErrorSpy.callCount > 0
|
||||
|
||||
runs ->
|
||||
expect(rootView.find('.symbols-view')).toExist()
|
||||
expect(symbolsView).toExist()
|
||||
expect(symbolsView.list.children('li').length).toBe 0
|
||||
expect(symbolsView.error).toBeVisible()
|
||||
expect(symbolsView.error.text().length).toBeGreaterThan 0
|
||||
|
||||
Reference in New Issue
Block a user