Yasuhiro Matsumoto wrote:

> On Wednesday, September 30, 2015 at 9:25:54 AM UTC+9, Nobuhiro Takasaki wrote:
> > > Always using the position from g_cbNonTermcap seems strange.
> > > Should we not depend on the value of g_fTermcapMode?
> > 
> > It was too simple. It is a failure.
> > I think that it is okay with this patch.
> > This is to check the g_fTermcapMode.
> > 
> > --------
> > Thanks.
> > Nobuhiro Takasaki
> 
> It may be compilation error with FEAT_GUI.
> 
> diff --git a/src/os_win32.c b/src/os_win32.c
> index 5114863..e738619 100644
> --- a/src/os_win32.c
> +++ b/src/os_win32.c
> @@ -230,6 +230,7 @@ static int win32_set_archive(char_u *name);
>  
>  #ifndef FEAT_GUI_W32
>  static int suppress_winsize = 1;     /* don't fiddle with console */
> +static void set_console_cursor_position(void);
>  #endif
>  
>  static char_u *exe_path = NULL;
> @@ -1396,7 +1397,7 @@ mch_set_cursor_shape(int thickness)
>  
>      SetConsoleCursorInfo(g_hConOut, &ConsoleCursorInfo);
>      if (s_cursor_visible)
> -     SetConsoleCursorPosition(g_hConOut, g_coord);
> +     set_console_cursor_position();
>  }
>  
>      void
> @@ -6743,3 +6744,17 @@ fix_arg_enc(void)
>      set_alist_count();
>  }
>  #endif
> +
> +#ifndef FEAT_GUI_W32
> +    static void
> +set_console_cursor_position(void)
> +{
> +    CONSOLE_SCREEN_BUFFER_INFO i;
> +
> +    if (g_fTermcapMode)
> +        return;
> +
> +    GetConsoleScreenBufferInfo(g_cbNonTermcap.handle, &i);
> +    SetConsoleCursorPosition(g_hConOut, i.dwCursorPosition);
> +}
> +#endif

Have you tried this out in various situations?  Now it skips setting
the cursor position when g_fTermcapMode is set.  Maybe it should call
the old SetConsoleCursorPosition(g_hConOut, g_coord) then.

-- 
I have a drinking problem -- I can't afford it.

 /// 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.

Raspunde prin e-mail lui