-
Notifications
You must be signed in to change notification settings - Fork 28
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
Cannot jump to the desired position if multiple windows contain the same content #142
Comments
Hello @ggandor Any workaround for this? Thanks a lot. |
This is very tricky, because extmarks (i.e., labels) can only be set for a buffer, and not for a window. So if you open multiple windows with the same content, then you will jump kinda "randomly" to one of them (depends on the order in |
I see. Thanks for the explanation.
For example, sometimes we may open three windows with the same file, one window for editing, and the other two for reference. Look at my last screenshot above please. I use the left window for editing, the middle window and the right window to refer different sections. However, as long as the middle window and the right window have same lines even if they are in a different position, we cannot jump to the window we want. Thank you. |
Yeah, I see. If there's even some overlap between two or more windows, it can prevent deterministic cross-window jumping. I don't see how this could be solved... I'll think about it though. |
For example, I totally opened three windows and the contents of each one are the same.
My cursor is located at line 126 in the leftmost window. I want to jump to
itemIndex++
, line 132, in the middle window. So I pressgs
followed byit
You can see that all these three windows have the same beacons. Then I press
H
. My cursor jumps to line 132 in the rightmost window, instead of the middle one.Next for the further test, I move the contents in the rightmost window upward a little bit. Now I press
gs
followed by `it, and they still have the same beacons and I still cannot jump to the middle window.Thank you so much.
The text was updated successfully, but these errors were encountered: