diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-11 09:12:04 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-02-11 09:33:41 +0800 |
commit | b7020e263e693dcad7de55f4175171f468ee44eb (patch) | |
tree | 950cd0abe4592fb169b478d2ba55e57e0cd824fd | |
parent | 5d2b6f4fa0dc51e8beadd9c3194ac210e8977a00 (diff) | |
download | rneovim-b7020e263e693dcad7de55f4175171f468ee44eb.tar.gz rneovim-b7020e263e693dcad7de55f4175171f468ee44eb.tar.bz2 rneovim-b7020e263e693dcad7de55f4175171f468ee44eb.zip |
vim-patch:9.1.1098: leaking memory with completing multi lines
Problem: leaking memory with completing multi lines
(after v9.1.1086)
Solution: free allocated memory (glepnir)
closes: vim/vim#16605
https://github.com/vim/vim/commit/e3647c8bf5b8143a24a37172e608a2e0c4661318
Co-authored-by: glepnir <glephunter@gmail.com>
-rw-r--r-- | src/nvim/insexpand.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index a5fc669b6e..5bf8c50143 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -3788,6 +3788,9 @@ void ins_compl_delete(bool new_leader) if ((int)curwin->w_cursor.col > col) { if (stop_arrow() == FAIL) { + if (remaining) { + XFREE_CLEAR(remaining); + } return; } backspace_until_column(col); |