mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
lua: support getting UTF-32 and UTF-16 sizes of replaced text
This commit is contained in:
@@ -780,6 +780,7 @@ open_line (
|
||||
did_append = FALSE;
|
||||
}
|
||||
|
||||
inhibit_delete_count++;
|
||||
if (newindent
|
||||
|| did_si
|
||||
) {
|
||||
@@ -821,6 +822,7 @@ open_line (
|
||||
did_si = false;
|
||||
}
|
||||
}
|
||||
inhibit_delete_count--;
|
||||
|
||||
/*
|
||||
* In REPLACE mode, for each character in the extra leader, there must be
|
||||
@@ -1685,7 +1687,7 @@ int del_bytes(colnr_T count, bool fixpos_arg, bool use_delcombine)
|
||||
bool was_alloced = ml_line_alloced(); // check if oldp was allocated
|
||||
char_u *newp;
|
||||
if (was_alloced) {
|
||||
curbuf->deleted_bytes += (size_t)oldlen+1;
|
||||
ml_add_deleted_len(curbuf->b_ml.ml_line_ptr, oldlen);
|
||||
newp = oldp; // use same allocated memory
|
||||
} else { // need to allocate a new line
|
||||
newp = xmalloc((size_t)(oldlen + 1 - count));
|
||||
|
Reference in New Issue
Block a user