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

No code folding in a new editor window #23622

Open
ycwang-hello opened this issue Feb 2, 2025 · 8 comments · May be fixed by #23722
Open

No code folding in a new editor window #23622

ycwang-hello opened this issue Feb 2, 2025 · 8 comments · May be fixed by #23722

Comments

@ycwang-hello
Copy link

I can see code folding in the editor in the main window. However, If I click "New Window" to open a new Editor window, there's no code folding buttons.

If I toggle on/off "Source>Show code folding", the sidebar widens/narrows, for both the original and the additional Editor, but only in the original Editor do I see the triangles.

Spyder version: 6.0.3 (standalone)

(Possibly related to #22332)

@ycwang-hello
Copy link
Author

Also related to a New Window of Editor: If I enable "View > Outline", the outline panel is shown on the left (while in Spyder v5 it was on the right). And it seems impossible to move the panels in the "New Window" Editor. If I click "Undock" or "Move" it changes the editor within the main window rather than that additional editor

@dalthviz
Copy link
Member

dalthviz commented Feb 3, 2025

Hi @ycwang-hello thank you for the report! I was able to reproduce this:

Image

We will try to check a fix for this in a future release 👍

@dalthviz dalthviz assigned dalthviz and unassigned dalthviz Feb 3, 2025
@dalthviz dalthviz added this to the v6.0.5 milestone Feb 3, 2025
@dalthviz
Copy link
Member

dalthviz commented Feb 3, 2025

Also related to a New Window of Editor: If I enable "View > Outline", the outline panel is shown on the left (while in Spyder v5 it was on the right). And it seems impossible to move the panels in the "New Window" Editor. If I click "Undock" or "Move" it changes the editor within the main window rather than that additional editor

I was able to reproduce this too, should we create another issue for that @ccordoba12 ? My guess is that those actions to move/undock shouldn't be shown for Editor Windows instances, right?

@athompson673
Copy link
Contributor

athompson673 commented Feb 4, 2025

Just want to mention this is the same with vertical and horizontal split. This also seems to apply to indent guides showing or not. In my adventures adding multi-cursor, I ended up kinda skimming over a lot interactions with folded code as it was complicated to manage the folded state which is somewhat tied to the codeeditor, and somewhat tied to the document. In my opinion, I'd be trying to remove all dependence on the document so that two codeeditors (separate window or split window) can have different folding state. The alternative would be to make all the state reside in the document so it is automatically synchronized, but that seems to me like it might be more difficult. Edit: actually maybe easiest to make all folding relative to document because hiding lines is done via document.block.setVisible 🤷‍♂️

@ccordoba12
Copy link
Member

I was able to reproduce this too, should we create another issue for that @ccordoba12 ? My guess is that those actions to move/undock shouldn't be shown for Editor Windows instances, right?

@dalthviz, I don't understand this: those actions are not displayed for me on new windows:

Image

Also related to a New Window of Editor: If I enable "View > Outline", the outline panel is shown on the left (while in Spyder v5 it was on the right). And it seems impossible to move the panels in the "New Window" Editor. If I click "Undock" or "Move" it changes the editor within the main window rather than that additional editor

@ycwang-hello, this is by design: new editor windows are not as flexible as the main Spyder window, so it's not possible to move the Outline to other positions. And we decided to leave it on the left because that's where it's shown in most editors and IDEs.

@dalthviz
Copy link
Member

dalthviz commented Feb 5, 2025

@dalthviz, I don't understand this: those actions are not displayed for me on new windows:

The Move/Undock actions that are being referenced are over the editorstack options menu:

Image

Those actions act over the mainwindow Editor:

Image

@ccordoba12
Copy link
Member

Ok, I see. Then yeah, please open a new issue about it.

@ccordoba12 ccordoba12 changed the title No code folding in a "New Window" of Editor No code folding in a new editor window Feb 5, 2025
@ccordoba12
Copy link
Member

Note: This was fixed (but never merged) for Spyder 5 in PR #21033

@jsbautista jsbautista linked a pull request Feb 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants