Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 33 by Glyph.Lefkowitz: bug report: feedkeys() leaks memory when
invoked from a CursorHoldI autocommand
http://code.google.com/p/vim/issues/detail?id=33
I believe this can be trivially demonstrated by doing:
:autocmd CursorHoldI * silent execute 'call feedkeys("\<C-r>\<Esc>",
"n")'
hitting "i", and watching memory usage instantly skyrocket. Various other
permutations also trigger the leak though. The speed of the leak will
obviously vary with 'updatetime'; for the most immediate effect, set it to
a very low value. Oddly, feedkeys() in a CursorHold autocommand (i.e. in
normal mode, not insert mode) does not leak.
Among other plugins, Conque <https://code.google.com/p/conque/> does this.
It's a hack, obviously, but until Vim gets real support for some kind of
async events, it's one of the more portable techniques; notably, it works
without +clientserver so it can be used in vim in a PTY rather than a GUI.
I am not including a bugreport.txt because this seems to affect all
versions of Vim 7.3 that I tried it with, so it does not seem runtime or
plugin dependent.
Thanks for your consideration, and thanks for Vim,
-glyph
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php