Hi Andy, On Thu, Jul 10, at 08:58 Andy Wokula wrote: > > Hmm, from my testing: :redir works a bit strange. While you think > :echo "line" sends "line\n", actually "\nline" is redirected. That's > why you get a first empty line in the file and the final EOL is missing. > And readfile() doesn't like files with missing EOL at the end.
Yes, I noticed exactly the same things too. However redir is not always fails to write the EOL, and this is not exactly random. In fact, after a small modification to the function, I could reproduce the order of the failure (redir runs). Without to add a delay: nth redirections = [10 16 20 23 26 28 30 32 34 36] after the 36th redirection it fails to write the EOL in every run. If I add a delay (a second or more) the failures are more random but quite close, but in all the tests, and after the 10nth failure, then in every redirection the EOL is missing. Regards, Ag. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---