fix(terminal): memory leak when pasting '=' register (#39738)

Problem:  Memory leak when pasting '=' register in terminal.
Solution: Free the register.
(cherry picked from commit 41e8201c6c)
This commit is contained in:
zeertzjq
2026-05-11 21:07:39 +08:00
committed by github-actions[bot]
parent dfd6cd477f
commit fa69cac7e3
2 changed files with 12 additions and 2 deletions

View File

@@ -123,6 +123,14 @@ describe(':terminal buffer', function()
appended tty ready |*5
|
]])
-- pasting expression register shouldn't leak memory
feed([["="abcd\nefghi"<CR>pi]])
screen:expect([[
appended tty ready |*4
abcd |
efghi^ |
{5:-- TERMINAL --} |
]])
end)
it('sends data to the terminal when the ":put" command is used', function()