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

Evaluating the current form throws when cursor is on a paren #4

Closed
Olical opened this issue Mar 25, 2019 · 4 comments
Closed

Evaluating the current form throws when cursor is on a paren #4

Olical opened this issue Mar 25, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Olical
Copy link
Owner

Olical commented Mar 25, 2019

This was working but appears to have broken. Possibly to do with AOT scarily enough, just making this issue so that others are aware.

,rr (eval outer form) is fine, ,re (eval current form) is okay as long as you're not on a paren or trying to eval a [] pair. I've got some hunches.

@Olical Olical added the bug Something isn't working label Mar 25, 2019
@Olical Olical self-assigned this Mar 25, 2019
@Olical
Copy link
Owner Author

Olical commented Mar 25, 2019

Fixed! fbaa857

@Olical Olical closed this as completed Mar 25, 2019
@Olical Olical reopened this Mar 25, 2019
@Olical
Copy link
Owner Author

Olical commented Mar 25, 2019

Okay, a bunch is fixed on the latest master but ,re on a outer paren of a top level form containing nothing else results in nothing happening... but only when AOTed, not in my REPL. Needs a little more investigation, could just be a cache somewhere I'm not aware of.

@Olical
Copy link
Owner Author

Olical commented Mar 26, 2019

Fixed that one! Found one more edge case, hoping it's the last one 😬 this one's rare but fixing it anyway.

[(+ 10 10) :a]
;^---- eval current form on that and it grabs the [ too

@Olical Olical closed this as completed in 556c41f Mar 26, 2019
@Olical
Copy link
Owner Author

Olical commented Mar 26, 2019

This was all caused by off by one errors between the cursor position, visual selection and searchpairpos. I invite you, dear reader, to try and break this again so I can improve it even more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant