Christian Brabandt wrote: > On Do, 07 Jul 2016, Bram Moolenaar wrote: > > > > > Patch 7.4.1996 > > Problem: Capturing the output of a command takes a few commands. > > Solution: Add evalcmd(). > > Files: src/eval.c, runtime/doc/eval.txt, src/testdir/test_alot.vim, > > src/Makefile, src/testdir/test_evalcmd.vim > > I am sorry, I found a bug: > > Take these two commands: > > com! Evalcmd :let a=evalcmd('norm! ga')|echon "start "|echon a > com! Redircmd redir =>g:a |exe ":sil! norm! ga"| redir end|:echon "start > "|:echon a > > Now move your cursor on any a and type :Redircmd > The output will look like this: > ,---- > | start > | <a> 97, Hex 61, Octal 141 > `---- > > Useing :Evalcmd looks like this: > ,---- > | :Evalcmd start > | <a> 97, Hex 61, Octal 141 > `---- > (The commandline is not cleared, so start is put on the same line)
Thanks for the example. I'll fix it. -- A man is incomplete until he's married ... and then he's finished! /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.