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

Fix cider-inspector-def-current-val #3660

Merged
merged 2 commits into from
May 13, 2024
Merged

Fix cider-inspector-def-current-val #3660

merged 2 commits into from
May 13, 2024

Conversation

alexander-yakushev
Copy link
Member

Two issues with it:

  1. The message in the minibuffer after d is used is ugly.
  2. The namespace where the values are defined is always user, because *cider-inspect* buffer is not associated with the code buffer where it was called from.

Before:
Screenshot 2024-05-13 at 11 09 31
After:
Screenshot 2024-05-13 at 11 14 58

…ggered

This fixes `cider-inspector-def-current-val` defining in `user` namespace.
@bbatsov
Copy link
Member

bbatsov commented May 13, 2024

I'm fine with the proposed change. I guess the old message didn't consider that a value could be pretty long and won't fit the minibuffer well.

@alexander-yakushev
Copy link
Member Author

alexander-yakushev commented May 13, 2024

I guess the old message didn't consider that a value could be pretty long and won't fit the minibuffer well.

That, and also that cider-nrepl op probably used to return the defined value as "value" in the nREPL message, but now it returns the rendered inspector state, so the user sees garbage instead.

I don't think it's necessary to "fix" the previously intended behavior of showing the value because it is only helpful for short values, and big values are when d is most useful in the first place.

@alexander-yakushev alexander-yakushev merged commit b421bbb into master May 13, 2024
11 of 35 checks passed
@alexander-yakushev alexander-yakushev deleted the inspector branch May 13, 2024 21:17
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

Successfully merging this pull request may close these issues.

3 participants