On Monday, April 19, 2021 at 7:53:14 AM UTC-4 Bram Moolenaar wrote:

>
> > I am building vim without the gui feature on windows 10 using mingw. I 
> am 
> > seeing many swapfiles left behind when I run the Vim test suite. 
> > 
> > This is apparently caused by the "echoconsole" command that is in the 
> file 
> > runtest.vim (the call was introduced in patch 8.2.2638). I believe this 
> > causes the problem because if I bracket that command with a test for 
> > "gui_running" the swapfiles are cleaned up as they should be and the 
> tests 
> > succeed. 
> > 
> > In addition, after echoconsole displays its arguments on stdout, vim.exe 
> > appears to terminate because I then see the command prompt from cmd.exe. 
> I 
> > don't see any indication of an error condition from Vim. 
> > 
> > Adding the if-test prevents the undesired behavior but I'm uncertain if 
> > that's the fix you would prefer so I haven't provided a patch and am 
> > limiting this note to reporting the problem. 
>
> Strange, I would not expect writing to the console have any effect on 
> swapfiles. Does this mean Vim crashes? If you are using MinGW, perhaps 
> you can use gdb to see what happens. 
>

If vim is crashing I see no evidence of it.  Except for the left-behind 
swapfiles, it appears that vim exiting without error.
 I will investigate further with gdb as you've suggested. 

I neglected to mention that I'm building with the "normal" feature set and 
that I see the same behavior if I build with the MSYS2 distribution.


> A workaround would be that when not running the GUI make :echoconsole 
> behave like :echomsg. In eval.c, ex_execute.c, change: 
>
> if (eap->cmdidx == CMD_echomsg) 
>
> into: 
>
> if (eap->cmdidx == CMD_echomsg || (eap->cmdidx == CMD_echoconsole && 
> !gui.in_use)) 
>
> You may have to add an #ifdef. 
>

I can't speak to the change you've suggested above but I think it is the 
right approach as opposed to just "fixing" the test which is why I did not 
propose a patch.  It seems inappropriate to me to have vim-without-gui 
printing to stdout.  

>
>
> -- 
> hundred-and-one symptoms of being an internet addict: 
> 123. You ask the car dealer to install an extra cigarette lighter 
> on your new car to power your notebook. 
>
> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ 
> /// \\\ 
> \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// 
> \\\ 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/25fecb65-ed1c-43f0-8b5b-07635e9bab3dn%40googlegroups.com.

Raspunde prin e-mail lui