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

"Show diff for error" intention #2229

Closed
onetom opened this issue Sep 4, 2019 · 4 comments
Closed

"Show diff for error" intention #2229

onetom opened this issue Sep 4, 2019 · 4 comments
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build
Milestone

Comments

@onetom
Copy link

onetom commented Sep 4, 2019

Currently it's not possible to open the diff window for a failed test using the keyboard.

Related discussion from Slack:

onetom 12:59 PM is there a shortcut key for showing the diff window for a test failiure? since it's not printed anywhere i keep have to hover and quickly aim the Show difference... link in the popping up bubble it's not very productive 😕 i would rather see the error messages in the repl window, instead of just the test run summary the diff of course can't be shown that intelligently as the IDEs diff window, so i wouldn't expect that in the REPL output, but at least there should be a key shortcut for it. btw, im using cmd-f1 for showing the error popup, so it's not really convenient to reach for the mouse afterwards, just to show the diffs too (edited)

cfleming:cursive: 4:25 PM
@onetom There isn’t, but you’re right, there should be. The easiest way to show the diff is to click on the gutter icon on the left, but you’re right, it needs a key.
👍:skin-tone-5:
1

8 replies

onetom 4 days ago
i haven't realized that icon is clickable.
that's already one action less, so it helps, thanks!
it's easy to misclick it though and place a breakpoint instead, accidentally.

onetom 4 days ago
I've just checked and it's even documented on https://cursive-ide.com/userguide/testing.html
I should be more thorough reading docs!

onetom 4 days ago
Not sure what would be a good shortcut for it.
Cmd-D is the default in other tool windows for showing diff, but in the editor it's duplicate line or selection, which is quite important. At least I use it all the time...
Cmd-D — Duplicate Line or Selection
Cmd-Shift-D — Smart Search Documentation in Dash
Cmd-Opt-D — [macOS] Show/Hide Dock
Cmd-Ctrl-D — [macOS] Dictionary Lookup
I guess Cmd-Shift-D is a good candidate, since it's only taken when the Dash plugin is installed.
Shall I make a github issue about this or no point?

cfleming:cursive: 4 days ago
Perhaps it could be an intention - “Show diff for error”, only available when actually on an error marker.

cfleming:cursive: 4 days ago
Yes, an issue would be good, thanks.

cfleming:cursive: 4 days ago
The intention would mean you’d just use alt-enter.
👍
3

Mark Addleman 4 days ago
The fewer magic keys I have to remember the better 🙂

cfleming:cursive: 4 days ago
Yeah, I like intentions for that, and also for being context-sensitive.
👍
1

@katox
Copy link

katox commented Apr 17, 2020

The keyboard shortcut would be handy to workaround a bug when the test failure gutter can't be clicked. Whether the REPL is run in debug mode or not Cursive tries to insert a breakpoint instead of showing the diff. It doesn't happen all the time but quite often.

The pop-up summary is there (on hover) but reading it can be a challenge if it shows a map or something longer. The test result summary is not in the REPL so in that case the only workaround (I know of) is to select everything in that popup, paste it into a clj scratch file, manualy edit it and then run both outputs through clojure.pprint.

@rutchkiwi
Copy link

rutchkiwi commented Mar 15, 2022

I injured my hand the other month and needed to use the keyboard exclusively - this issue was the only thing in cursive that does not work keyboard only. Would be really nice to get fixed!

@cursive-ide cursive-ide added this to the 1.12.4 milestone May 3, 2022
@cursive-ide cursive-ide modified the milestones: 1.12.4, 1.12.4-eap1 May 21, 2022
@cursive-ide cursive-ide added the new Marks issues describing new features label May 21, 2022
@jaimesangcap
Copy link

Whoa! Is it implemented? Excited to try it out

@cursive-ide
Copy link
Owner

@jaimesangcap It is! It's out now in 1.12.4-eap1.

@cursive-ide cursive-ide added the released Marks issues which have had the fixes released in a stable build label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Marks issues describing new features released Marks issues which have had the fixes released in a stable build
Projects
None yet
Development

No branches or pull requests

5 participants