Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast file switch and fast symbol search do not work properly if the editor is splitted #5057

Closed
arman00 opened this issue Aug 25, 2017 · 5 comments

Comments

@arman00
Copy link

arman00 commented Aug 25, 2017

Description

Fast file switch and fast symbol search do not work on the split panels. They only work in the first (main) panel, whether there is a split or not.

What steps will reproduce the problem?

Fast file switch:

  1. Open two or more files in the editor
  2. Split the editor panel
  3. Select the split panel (not the first main panel)
  4. ctrl+p and select a different file than the current file in the panel

Fast symbol search:

  1. Split the editor panel
  2. Select the split panel (not the first panel)
  3. ctrl+alt+p and select a symbol in the file to go to that line

What is the expected output? What do you see instead?
Fast file switch:
expected: the selected file is shown the split panel
actual: the current file in the panel is not replaced

Fast symbol search:
expected: the line of the selected symbol should be highlighted in the split panel
actual:

  • always highlights the line in the first main panel, not in the split panel.
  • if the file in the split panel is different from the file in the first main panel, the symbol list is also of the main panel instead of the split panel

Please provide any additional information below

Version and main components

  • Spyder Version: 3.2.1
  • Python Version: 3.5.3
  • Qt Versions: 5.9.1, PyQt5 5.9 on Windows

Dependencies

pyflakes >=0.6.0 :  1.6.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
numpy >=1.7      :  1.13.1 (OK)
sphinx >=0.6.6   :  1.6.3 (OK)
rope >=0.9.4     :  0.10.7 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
nbconvert >=4.0  :  5.2.1 (OK)
sympy >=0.7.3    :  1.1.1 (OK)
cython >=0.21    :  0.26 (OK)
qtconsole >=4.2.0:  4.3.1 (OK)
IPython >=4.0    :  6.1.0 (OK)
pylint >=0.25    :  1.7.2 (OK)

@ccordoba12
Copy link
Member

Thanks for reporting this problem. We'll take a look at it in a future release.

@arman00
Copy link
Author

arman00 commented Aug 25, 2017

A small note: they have worked properly in the versions before Spyder 3.2

@arman00
Copy link
Author

arman00 commented Aug 28, 2017

I have seen that they also don't work on a second window which is created by the "New window'' selection, as with the split panels.

I believe this is a bug rather than enhancement and it became broken with version 3.2. I was using these fast switching abilities very frequently in the previous versions, they're really very useful features, so it's a bit frustrating for me now. Hope there is a chance to fix it soon. Thank you for all of your great work on Spyder!

@jnsebgosselin
Copy link
Member

This bug was introduced in PR #4626. Following this PR, Ctrl-P does not open the a file switcher per editor anymore, but a global file switcher instead. This new global switcher can also includes files from other plugins, such as Notebook plugin (see Issue #4575 for more details).

The problem we have here is that, new editor stacks added to the editor plugin by splitting are never registered with this global file switcher. Only the first one is when the editor plugin is registered with Spyder's main window. So this need to be done in order for this to work also with split editors.

@ccordoba12 ccordoba12 modified the milestones: v3.2.4, v3.2.x Sep 13, 2017
@ccordoba12
Copy link
Member

Thanks for wanting to solve this one @jnsebgosselin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants