Hi Mike and Bram, 2015/10/25 Sun 21:55:29 UTC+9 Bram Moolenaar wrote: > Mike Windows wrote: > > > On my Windows boxes I use ConsoleZ (https://github.com/cbucher/console) > > instead of the standard command or powershell prompts. Using 7.4p889 > > when I start console VIM I get a brief flash of the VIM interface before > > it switches back to the original command line display. VIM is still > > running (can be seen in task manager consuming CPU) but keyboard input > > has no effect on - :q doesn't quit VIM and the command prompt doesn't > > show any keyboard input. This all started with patch 851, Saving and > > restoring the console buffer does not work properly. > > > > I have checked what happens with the command and powershell shells using > > ConsoleZ and there is no difference in behaviour. I am using version > > 1.15.0.15253 of ConsoleZ. ConsoleZ is a fork of Console > > (http://sourceforge.net/projects/console/). I checked what happens with > > Console version Console 2.00.148 and it behaves the same as ConsoleZ. > > > > It may be an issue with the Console apps but I have been using both for > > the last few years and until this patch have had no problems using > > console VIM with them. The finger pointing has to start somewhere so > > let it be here. > > The handling of the console was change in a few recent patches. I hoped > the author(s) of those patches would respond. > > Possibly relevant patches: > > Patch 7.4.886 Windows7: Switching screen buffer causes flicker when > using system(). Should only apply to system(). Do you have an external > command in your startup? > > Patch 7.4.876 Windows7: when using vim.exe with msys or msys2, > conhost.exe (console window provider on Windows7) will freeze or crash. > Similarly, should only affect executing an external program. > > Patch 7.4.851 Saving and restoring the console buffer does not work > properly. This looks like the main suspect. Can you try going to patch > 7.4.850 and 7.4.851, check whether the problem is caused by this patch?
It is obvious that 7.4.851 causes this problem. When I wrote the patch, I thought that using CreateConsoleScreenBuffer and SetConsoleActiveScreenBuffer is a perfect solution to save and restore a console buffer, but now I think it was totally wrong because it causes many problems. 1. The patch 7.4.851 hits a known bug on Windows 7. - https://github.com/cbucher/console/issues/148#issuecomment-66362147 - https://fogbugz.bitvise.com/default.asp?WinSSHD.1.16969.1 - http://support.microsoft.com/kb/2458000 This is fixed with 7.4.876 and 7.4.886, but I think that it still has a potential problem. When a vim plugin execute an external program without using system() (e.g. using if_python, if_ruby, vimproc, etc.), crashes might occur. 2. The patch hits another (unknown?) bug on Windows 10 when vimproc is used. - https://github.com/Shougo/neocomplete.vim/issues/471 - https://github.com/Shougo/vimproc.vim/issues/208 Currently, I have no idea how to fix this. 3. Some console emulators (ConsoleZ, Console2, ckw, winpty, etc.) don't support CreateConsoleScreenBuffer and SetConsoleActiveScreenBuffer. This is the cause of the problem which was reported by Mike. I hope these console emulators support these APIs, but it might take long time. (FYI, ConEmu seems to support these APIs but not perfect.) So I propose Bram to revert 7.4.851, 7.4.876 and 7.4.886. Regards, Ken Takata -- -- 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]. For more options, visit https://groups.google.com/d/optout.
