Repository: spyder-ide/spyder

Issue:
Symbol switcher throws exception after Enter
## Problem Description
symbol switcher throws exception after hitting enter on any symbol 
(spyder 4.0.0b2, worked fine on spyder 3.4)

If I use the file switcher BEFORE I use the symbol switcher, no exception is created.
I think the problem is in fileswitcher.py, the function setup_symbol_list doesnt set up filtered_path.

### What steps reproduce the problem?

1. on any file use the symbol switcher and hit enter on some symbol
2. the Issue reporter opens with the an exception



### Paste Traceback/Error Below (if applicable)
<!--- Copy from error dialog or View > Panes > Internal Console --->

```python-traceback

  File "C:\Users\Tal\Miniconda3\envs\py37\lib\site-packages\spyder\widgets\fileswitcher.py", line 691, in enter
    stack_index = self.paths.index(self.filtered_path[row])
AttributeError: 'FileSwitcher' object has no attribute 'filtered_path'


```


Spyder 4.0.0b2 
Python 3.7.3 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Windows 10 

### Dependencies

```
pygments >=2.0     :  2.3.1 (OK)
qdarkstyle >=2.6.4 :  2.6.8 (OK)
sphinx >=0.6.6     :  2.0.1 (OK)
pyls >=0.19.0;<0.25:  0.24.0 (OK)
nbconvert >=4.0    :  5.4.1 (OK)
pandas >=0.13.1    :  0.24.2 (OK)
numpy >=1.7        :  1.16.4 (OK)
sympy >=0.7.3      :  None (NOK)
cython >=0.21      :  None (NOK)
qtconsole >=4.2.0  :  4.4.3 (OK)
IPython >=4.0      :  7.4.0 (OK)
matplotlib >=2.0.0 :  3.0.3 (OK)
pylint >=0.25      :  2.3.1 (OK)

```

note: I changed the shortcut to ctrl+R, didn't check with the default shortcut


Discussion:
@talkaminker thanks for reporting! we will fix this for beta3

@dalthviz could you take care of this one?

Resolving patch:
diff --git a/spyder/widgets/fileswitcher.py b/spyder/widgets/fileswitcher.py
--- a/spyder/widgets/fileswitcher.py
+++ b/spyder/widgets/fileswitcher.py
@@ -682,17 +682,18 @@ def item_selection_changed(self):
     @Slot()
     @Slot(QListWidgetItem)
     def enter(self, itemClicked=None):
-        row = self.current_row()
-        stack_index = self.paths.index(self.filtered_path[row])
-        self.plugin = self.widgets[stack_index][1]
-        plugin_index = self.plugins_instances.index(self.plugin)
-        # Count the real index in the tabWidget of the
-        # current plugin
-        real_index = self.get_stack_index(stack_index,
-                                          plugin_index)
-        self.sig_goto_file.emit(real_index,
-                                self.plugin.get_current_tab_manager())
-        self.accept()
+        if self.mode == self.FILE_MODE:
+            row = self.current_row()
+            stack_index = self.paths.index(self.filtered_path[row])
+            self.plugin = self.widgets[stack_index][1]
+            plugin_index = self.plugins_instances.index(self.plugin)
+            # Count the real index in the tabWidget of the
+            # current plugin
+            real_index = self.get_stack_index(stack_index,
+                                              plugin_index)
+            self.sig_goto_file.emit(real_index,
+                                    self.plugin.get_current_tab_manager())
+            self.accept()
 
     def setup_file_list(self, filter_text, current_path):
         """Setup list widget content for file list display."""


Test patch: