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:
Kevin Sawicki
2013-06-03 11:46:24 -07:00
parent f90530f593
commit 7f0947ef9b
2 changed files with 1 additions and 5 deletions

View File

@@ -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))

View 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