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

Global marks not cleared correctly #162

Open
sigzegv opened this issue Jun 8, 2018 · 2 comments
Open

Global marks not cleared correctly #162

sigzegv opened this issue Jun 8, 2018 · 2 comments

Comments

@sigzegv
Copy link

sigzegv commented Jun 8, 2018

When using 2 files on a splited vim window, if I set a global mark on the first file, and then set the same global mark on the second pane, mark on the first pane is not cleared in the gutter (while global mark is effectively removed from first file).

@kshenoy
Copy link
Owner

kshenoy commented Jun 11, 2018

TLDR version:
@sigzegv Marks are updated only when you enter the buffer. I did it this way to keep the implementation simple.

RTFM version:
When you add a global mark to the second buffer, I'd have to figure out if it exists in another file, if that file is open in a buffer and clear the sign for it before I place the new mark or I lose information about where the mark was placed previously. Furthermore, if there are multiple global marks strewn about, every time a global mark is placed I'd have to do each of the above steps.
In conclusion, all of this is possible and maybe not too difficult to implement. However, I chose to keep it simple. Updating only when the buffer is entered allows doing all the updates at once.

EDIT:
The above explanation is assuming you didn't move back to the first buffer after placing the mark in the second buffer. If you see the mark persist even after moving back, please let me know; that's a bug (though I just tested it and it seems to be working fine)

@sigzegv
Copy link
Author

sigzegv commented Jun 12, 2018

Yes I didn't clarified it, if you move back the gutter is cleaned correctly.

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