aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.c
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-10-11 19:00:52 +0000
committerJosh Rahm <rahm@google.com>2022-10-11 19:00:52 +0000
commit21e2e46242033c7aaa6ccfb23e256680816c063c (patch)
treef089522cfb145d6e9c8a86a01d8e454ce5501e20 /src/nvim/extmark.c
parent179d3ed87b17988f5fe00d8b99f2611a28212be7 (diff)
parent760b399f6c0c6470daa0663752bd22886997f9e6 (diff)
downloadrneovim-21e2e46242033c7aaa6ccfb23e256680816c063c.tar.gz
rneovim-21e2e46242033c7aaa6ccfb23e256680816c063c.tar.bz2
rneovim-21e2e46242033c7aaa6ccfb23e256680816c063c.zip
Merge remote-tracking branch 'upstream/master' into floattitlefloattitle
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r--src/nvim/extmark.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index 1639f72990..176ad0d5c8 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -30,6 +30,7 @@
#include <assert.h>
+#include "klib/kbtree.h"
#include "nvim/api/extmark.h"
#include "nvim/buffer.h"
#include "nvim/buffer_updates.h"
@@ -37,7 +38,6 @@
#include "nvim/decoration.h"
#include "nvim/extmark.h"
#include "nvim/globals.h"
-#include "nvim/lib/kbtree.h"
#include "nvim/map.h"
#include "nvim/memline.h"
#include "nvim/pos.h"
@@ -70,7 +70,8 @@ void extmark_set(buf_T *buf, uint32_t ns_id, uint32_t *idp, int row, colnr_T col
|| kv_size(decor->virt_lines)
|| decor->conceal
|| decor_has_sign(decor)
- || decor->ui_watched) {
+ || decor->ui_watched
+ || decor->spell) {
decor_full = true;
decor = xmemdup(decor, sizeof *decor);
}
@@ -510,11 +511,11 @@ void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, linenr_T amount,
bcount_t old_byte = 0, new_byte = 0;
int old_row, new_row;
if (amount == MAXLNUM) {
- old_row = (int)(line2 - line1 + 1);
+ old_row = line2 - line1 + 1;
// TODO(bfredl): ej kasta?
old_byte = (bcount_t)buf->deleted_bytes2;
- new_row = (int)(amount_after + old_row);
+ new_row = amount_after + old_row;
} else {
// A region is either deleted (amount == MAXLNUM) or
// added (line2 == MAXLNUM). The only other case is :move