diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-10-24 13:32:00 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-11-08 02:53:49 +0100 |
commit | 4e6f559b8c5f77924fdbe2e5abd9c6aa8efad13f (patch) | |
tree | 758c87fba796537921e16c49bcd2c377e77e6506 /src/nvim/extmark.h | |
parent | 324fad1e88ba38c87db446418a96fd3170b7f392 (diff) | |
download | rneovim-4e6f559b8c5f77924fdbe2e5abd9c6aa8efad13f.tar.gz rneovim-4e6f559b8c5f77924fdbe2e5abd9c6aa8efad13f.tar.bz2 rneovim-4e6f559b8c5f77924fdbe2e5abd9c6aa8efad13f.zip |
feat(extmarks): add 'invalidate' property to extmarks
Problem: No way to have extmarks automatically removed when the range it
is attached to is deleted.
Solution: Add new 'invalidate' property that will hide a mark when the
entirety of its range is deleted. When "undo_restore" is set
to false, delete the mark from the buffer instead.
Diffstat (limited to 'src/nvim/extmark.h')
-rw-r--r-- | src/nvim/extmark.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/extmark.h b/src/nvim/extmark.h index 83c7a7cb69..6b7292465c 100644 --- a/src/nvim/extmark.h +++ b/src/nvim/extmark.h @@ -25,9 +25,13 @@ typedef struct { colnr_T end_col; bool right_gravity; bool end_right_gravity; + bool invalidate; + bool invalid; bool no_undo; Decoration decor; // TODO(bfredl): CHONKY } ExtmarkInfo; +#define EXTMARKINFO_INIT { 0, 0, -1, -1, -1, -1, false, false, false, false, false, \ + DECORATION_INIT }; typedef kvec_t(ExtmarkInfo) ExtmarkInfoArray; @@ -67,6 +71,7 @@ typedef struct { colnr_T old_col; int row; colnr_T col; + bool invalidated; } ExtmarkSavePos; typedef enum { |