aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-02-19 12:07:16 +0100
committerbfredl <bjorn.linse@gmail.com>2024-02-19 13:48:39 +0100
commit404707c7606389ccb6c6062bfe9e2ff30a2552af (patch)
tree5ec63802345311d8ebdd50e51b528a12f06431d5 /src/nvim/ops.c
parentd14eefaee9519dae76bfaf4dd42e3bd7a05c7a1e (diff)
downloadrneovim-404707c7606389ccb6c6062bfe9e2ff30a2552af.tar.gz
rneovim-404707c7606389ccb6c6062bfe9e2ff30a2552af.tar.bz2
rneovim-404707c7606389ccb6c6062bfe9e2ff30a2552af.zip
refactor(api): use arena for nvim_put and nvim_paste
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index f91df49e4f..e7a3aa29aa 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -6499,8 +6499,6 @@ bool prepare_yankreg_from_object(yankreg_T *reg, String regtype, size_t lines)
}
}
- reg->y_array = xcalloc(lines, sizeof(uint8_t *));
- reg->y_size = lines;
reg->additional_data = NULL;
reg->timestamp = 0;
return true;
@@ -6513,7 +6511,6 @@ void finish_yankreg_from_object(yankreg_T *reg, bool clipboard_adjust)
// but otherwise there is no line after the final newline
if (reg->y_type != kMTCharWise) {
if (reg->y_type == kMTUnknown || clipboard_adjust) {
- xfree(reg->y_array[reg->y_size - 1]);
reg->y_size--;
}
if (reg->y_type == kMTUnknown) {