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

cider-jump-to puts cursor in awkward position in the navigated-to buffer window #2850

Closed
mrrodriguez opened this issue May 29, 2020 · 2 comments

Comments

@mrrodriguez
Copy link

I have observed that cider-jump-to which is called from cider-find-var seems to now always put the cursor/point on the last line of the buffer it navigates into. The line is not centered. So it means my point is really low in the buffer and I always forget and can’t find it.

I do not remember this being the case in the past. It used to be I believe centered on the line that was navigated to.

I’m on 0.25.0snapshot of cider, but I think it's been around for a while now.

I typically deal with it by immediately calling recenter-top-bottom in the newly navigated to buffer so that my cursor (point) is in a predictable place that I can find.

Ideally, cider would jump into a new buffer and do something like center point in the middle of the buffer or perhaps at the top. I think the worst place for cursor/point to end up is the last line of the buffer - and this is typically what I'm seeing.

@mrrodriguez mrrodriguez changed the title cider-jump-to / cider-find-var puts point in awkward places in the buffer window cider-{jump-to/find-var} puts point in awkward places in the buffer window May 29, 2020
@mrrodriguez mrrodriguez changed the title cider-{jump-to/find-var} puts point in awkward places in the buffer window cider-{jump-to/find-var} puts cursor in awkward places in the buffer window May 29, 2020
@mrrodriguez mrrodriguez changed the title cider-{jump-to/find-var} puts cursor in awkward places in the buffer window cider-{jump-to/find-var} puts cursor in awkward position in the new buffer window May 29, 2020
@mrrodriguez mrrodriguez changed the title cider-{jump-to/find-var} puts cursor in awkward position in the new buffer window cider-{jump-to/find-var} puts cursor in awkward position in the navigated-to buffer window May 29, 2020
@mrrodriguez mrrodriguez changed the title cider-{jump-to/find-var} puts cursor in awkward position in the navigated-to buffer window cider-jump-to puts cursor in awkward position in the navigated-to buffer window May 29, 2020
@bbatsov
Copy link
Member

bbatsov commented May 30, 2020

I have observed that cider-jump-to which is called from cider-find-var seems to now always put the cursor/point on the last line of the buffer it navigates into. The line is not centered. So it means my point is really low in the buffer and I always forget and can’t find it.

Same problem here. :-)

I do not remember this being the case in the past. It used to be I believe centered on the line that was navigated to.

I guess it has been like this for a very long time.

Ideally, cider would jump into a new buffer and do something like center point in the middle of the buffer or perhaps at the top. I think the worst place for cursor/point to end up is the last line of the buffer - and this is typically what I'm seeing.

Agreed. I'll just have it centered. I doubt anyone would dislike this - if so I can make it configurable.

@mrrodriguez
Copy link
Author

Thanks for the quick response and update!

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