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

Restore all cursors, instead of only the current window #978

Merged
merged 1 commit into from
Oct 21, 2019
Merged

Restore all cursors, instead of only the current window #978

merged 1 commit into from
Oct 21, 2019

Conversation

ahrex
Copy link
Contributor

@ahrex ahrex commented Aug 13, 2019

If we have the same buffer open in multiple windows/tabs, we'll only restore the current window's cursor.

Iterate through all tabs and windows, and save/restore all cursor positions of windows that contain our buffer.

Addendum to #433.

@ahrex
Copy link
Contributor Author

ahrex commented Aug 21, 2019

@JelleZijlstra, @zsol, could you take a look?

Thanks!

@zsol
Copy link
Collaborator

zsol commented Aug 24, 2019

Sorry I don't know anything about vim plugins :( I'm definitely not the right person to review this

@ahrex
Copy link
Contributor Author

ahrex commented Aug 24, 2019

@ambv, could you see if this change is good?

If we have the same buffer open in multiple windows/tabs, we'll only
restore the current window's cursor.

Iterate through all tabs and windows, and save/restore all cursor
positions of windows that contain our buffer.

Addendum to #433.
@ambv
Copy link
Collaborator

ambv commented Oct 20, 2019

Sorry, I merged another PR which fixes the cursor to be restored to line of code instead of line in file. This conflicts now. Could you rebase your fix?

@ahrex
Copy link
Contributor Author

ahrex commented Oct 21, 2019

I took a look at #989, and I don't think this change is compatible with that PR.

Making an additional pass at the file contents gets expensive if you're to scale for n buffers.

Feel free to decline this PR, or back the other out and place this one in instead.

@ambv ambv merged commit ba2733d into psf:master Oct 21, 2019
@ambv
Copy link
Collaborator

ambv commented Oct 21, 2019

Thanks! ✨ 🍰 ✨

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