mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
allow for extmark gravity to be set through api
This commit is contained in:
@@ -71,7 +71,7 @@ static ExtmarkNs *buf_ns_ref(buf_T *buf, uint64_t ns_id, bool put) {
|
||||
/// @returns the mark id
|
||||
uint64_t extmark_set(buf_T *buf, uint64_t ns_id, uint64_t id,
|
||||
int row, colnr_T col, int end_row, colnr_T end_col,
|
||||
Decoration *decor, ExtmarkOp op)
|
||||
Decoration *decor, bool right_gravity, ExtmarkOp op)
|
||||
{
|
||||
ExtmarkNs *ns = buf_ns_ref(buf, ns_id, true);
|
||||
assert(ns != NULL);
|
||||
@@ -109,10 +109,10 @@ uint64_t extmark_set(buf_T *buf, uint64_t ns_id, uint64_t id,
|
||||
|
||||
if (end_row > -1) {
|
||||
mark = marktree_put_pair(buf->b_marktree,
|
||||
row, col, true,
|
||||
row, col, right_gravity,
|
||||
end_row, end_col, false);
|
||||
} else {
|
||||
mark = marktree_put(buf->b_marktree, row, col, true);
|
||||
mark = marktree_put(buf->b_marktree, row, col, right_gravity);
|
||||
}
|
||||
|
||||
revised:
|
||||
|
Reference in New Issue
Block a user