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
Extmarks api: allow for gravity #13679
Conversation
There was a helpful discussion about this in #12249. In the end, I felt that two options seemed the best to me:
or
Either option is fine with me. Once we decide on which one to go with, I'll add the corresponding option for end_gravity. |
|
…nd position of extmark
What about RTL (if it's ever going to be supported with extmarks, that is)? Would it make sense for RTL text to have |
Friendly reminder: #12742 is still open, if you find anything useful in there, feel free to steal :) |
RTL is a display feature (that UI:s are gonna handle in differerent ways), it better not affect editing semantics in the core layer. |
@bfredl whenever you have the time, do you mind reviewing this? I think its pretty much ready for merge. |
I agree, merged :) |
Allows for extmark gravity to be set.
An example: suppose we have the following text, with an extmark placed where the pipe is:
asdf|asdf
normally, if we type (gravity = "right"), the extmark will move with the cursor:
asdfhello|asdf
but with gravity = "left", the extmark will stay put:
asdf|helloasdf
.To decide: do we want to allow gravity for the end_col and end_row of extmarks as well? Would be useful to know of potential use cases where this would be needed.