diff options
author | Tony Chen <tchen1998@gmail.com> | 2020-12-21 17:51:52 -0800 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-01-01 19:51:45 +0100 |
commit | 45b14f88db1b332938f4a73be28966ae60563a50 (patch) | |
tree | 5603556abeb06119df0f30af921ba20f71a498f2 /src/nvim/extmark.c | |
parent | 29ad2ebc1688176a1c7acaa81103dac289de0ad1 (diff) | |
download | rneovim-45b14f88db1b332938f4a73be28966ae60563a50.tar.gz rneovim-45b14f88db1b332938f4a73be28966ae60563a50.tar.bz2 rneovim-45b14f88db1b332938f4a73be28966ae60563a50.zip |
api: set_text: rebase, update to new api, and add more tests
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r-- | src/nvim/extmark.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index ba685b158e..b2d8532cd7 100644 --- a/src/nvim/extmark.c +++ b/src/nvim/extmark.c @@ -560,6 +560,23 @@ void extmark_adjust(buf_T *buf, new_row, 0, new_byte, undo); } +// Adjust extmarks following a text edit. +// +// @param buf +// @param start_row Start row of the region to be changed +// @param start_col Start col of the region to be changed +// @param old_row End row of the region to be changed. +// Encoded as an offset to start_row. +// @param old_col End col of the region to be changed. Encodes +// an offset from start_col if old_row = 0; otherwise, +// encodes the end column of the old region. +// @param old_byte Byte extent of the region to be changed. +// @param new_row Row offset of the new region. +// @param new_col Col offset of the new region. Encodes an offset from +// start_col if new_row = 0; otherwise, encodes +// the end column of the new region. +// @param new_byte Byte extent of the new region. +// @param undo void extmark_splice(buf_T *buf, int start_row, colnr_T start_col, int old_row, colnr_T old_col, bcount_t old_byte, |