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

Possibly display error overlays on cider-load-buffer #3571

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Possibly display error overlays on cider-load-buffer #3571

merged 2 commits into from
Nov 6, 2023

Conversation

vemv
Copy link
Member

@vemv vemv commented Nov 5, 2023

Part of #3495

I verified locally that it works nicely.

Cheers - V

@vemv vemv requested a review from bbatsov November 5, 2023 13:07
(let* ((phase (cider--error-phase-of-last-exception buffer))
;; 2.- Calculate the overlay position, which is the point (per the previous jump),
;; and then end-of-line (for ensuring the overlay will be rendered properly):
(end (save-excursion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this be problematic on long lines? I think it's probably best to just have the overlay at the point's position after the jump to the error line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, the overlay (as defined deeper in our codebase) would be rendered in the previous top sexpr's end line, which was very confusing.

Anyway, I coded that (unawarely) assuming cider-result-overlay-position == 'at-eol.

I'll adapt it to work with both possible user choices - after that we should have something pretty acceptable and that follows the existing defcustom's semantics.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@bbatsov bbatsov merged commit ef87c71 into master Nov 6, 2023
26 checks passed
@bbatsov bbatsov deleted the 3495 branch November 6, 2023 18:06
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.

2 participants