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

Lets in toplevel let: shouldn't show loc, k and x in the Structure panel #415

Closed
jfehrle opened this issue May 31, 2023 · 6 comments
Closed
Assignees

Comments

@jfehrle
Copy link
Collaborator

jfehrle commented May 31, 2023

plugin version: 0113-2023.1

Description

Was this perhaps intentional? It doesn't seems to show every let in functions. If I duplicate the x line, there are 2 entries for x in the structure panel.

image

@giraud
Copy link
Owner

giraud commented Jun 1, 2023

I don’t understand the problem. It seems you are defining 3 inner variables loc, k and x: structure looks correct.
If you duplicate x, you will get two entries with x.
I am missing something.

@jfehrle
Copy link
Collaborator Author

jfehrle commented Jun 1, 2023

I tweaked the description, which was poorly worded.

It's just that I don't expect the structure panel to show definitions of local variables. Not a bug, but my preference. If you want to show them, then shouldn't the function parameter 'fr' appear, too? Given that the structure panel opens all toplevel items automatically, the local variables distract me from what I'm most interested in seeing--the globals.

Is it really useful to show the assignments to record fields of ltacvars below? Also, the definitions are not in alpha or file order (I've set alpha order; they are in the correct order if I turn that off).

image

@giraud
Copy link
Owner

giraud commented Jun 6, 2023

I agree that inner elements are too much, I’m not using them myself.
I believe it was implemented from a request but I can’t remember exactly. I thought that only one level of inner variables was shown.
also, normally the 'eye' icon should hide these inner definitions if disabled.
I will see why multiple levels are shown.

@giraud giraud self-assigned this Dec 18, 2023
@giraud
Copy link
Owner

giraud commented Dec 20, 2023

if not useful, I can remove the 'eye' icon and only top level definitions will be visible. would that 'fix' the bug ?

@jfehrle
Copy link
Collaborator Author

jfehrle commented Dec 20, 2023

I was not aware of the eye icon, that hides the distracting info. GUIs are not really self-documenting, alas. So I would not spend time on this. User requests are sometime contradictory (across multiple users, though hopefully individual users are self-consistent :-).

@giraud
Copy link
Owner

giraud commented Dec 21, 2023

ok, won’t fix then.
I have updated the code to keep only one level deep (removing record fields of inner let).

@giraud giraud closed this as completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants