diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-01-01 20:21:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-01 20:21:09 +0100 |
commit | dac3b35ece131897b60fe271856f9b6f8bae8b96 (patch) | |
tree | f4456a9e86533105472caddd3c0b1cec07650add /src/nvim/extmark.c | |
parent | 90f619f140f0736f67fef796d58203fe261c43af (diff) | |
parent | 39d098f9f9dc244a84958202e221ed0bdc6ee88a (diff) | |
download | rneovim-dac3b35ece131897b60fe271856f9b6f8bae8b96.tar.gz rneovim-dac3b35ece131897b60fe271856f9b6f8bae8b96.tar.bz2 rneovim-dac3b35ece131897b60fe271856f9b6f8bae8b96.zip |
Merge pull request #11833 from bfredl/set_text
nvim_buf_set_text
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, |