diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-01-22 09:55:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 09:55:00 +0100 |
commit | b803bfa5aab1a2f8c74984fbf1176d1ff57d8540 (patch) | |
tree | f155fe3a7c5afd6457e3e726ea868a41b2bcd3a3 /src/nvim/extmark.c | |
parent | 1607dd071fe1685cf42b0182b8d1d72152af2c40 (diff) | |
parent | 2ac0ca2025746c39d10aad0e32749174b4222448 (diff) | |
download | rneovim-b803bfa5aab1a2f8c74984fbf1176d1ff57d8540.tar.gz rneovim-b803bfa5aab1a2f8c74984fbf1176d1ff57d8540.tar.bz2 rneovim-b803bfa5aab1a2f8c74984fbf1176d1ff57d8540.zip |
Merge pull request #13679 from chentau/gravity
Extmarks api: allow for gravity
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r-- | src/nvim/extmark.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index b2d8532cd7..cacbeddb32 100644 --- a/src/nvim/extmark.c +++ b/src/nvim/extmark.c @@ -71,7 +71,8 @@ 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, + bool end_right_gravity, ExtmarkOp op) { ExtmarkNs *ns = buf_ns_ref(buf, ns_id, true); assert(ns != NULL); @@ -109,10 +110,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, - end_row, end_col, false); + row, col, right_gravity, + end_row, end_col, end_right_gravity); } else { - mark = marktree_put(buf->b_marktree, row, col, true); + mark = marktree_put(buf->b_marktree, row, col, right_gravity); } revised: |