Hi, 2015/8/8 Sat 19:35:48 UTC+9 Ken Takata wrote: > Hi, > > As mattn mentioned, currently vim.exe uses > ReadConsoleOutputA/WriteConsoleOutputA to save and restore the console buffer. > But I think using CreateConsoleScreenBuffer and SetConsoleActiveScreenBuffer > is a straight forward way. We don't need to save the console buffer by ourself > if we use these APIs, because it is a matter of an OS. > > I attached patches for this. > The first patch implements this and just comments out old codes. > The second patch removes the old codes. > I separated the patches because of readability. > > Actually, these patches still use ReadConsoleOutputW/WriteConsoleOutputW for > 'norestorescreen'. We need to copy the last Vim screen to the original console > buffer when 'restorescreen' is not set. > > Note: These patches won't work on Win9x, because I used Unicode version of > Win32 APIs directly. I don't think it matters, because no one complains that > the official 7.4 binary doesn't work on Win9x. (VC2005 is the last VC which > supports Win9x, but the official binary is built by VC2008.)
I found that after applying this patch, vim.exe doesn't work on winpty on mintty. (https://github.com/rprichard/winpty) Maybe winpty doesn't support CreateConsoleScreenBuffer / SetConsoleActiveScreenBuffer. However, people who want to use Vim on mintty should use cygwin-vim or msys-vim, not Win32-vim on winpty, IMO. So it isn't a problem. I hope winpty will support CreateConsoleScreenBuffer / SetConsoleActiveScreenBuffer. 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.
