Hirohito Higashi wrote:

> h-east commented on this pull request.
> 
> > -    if (dyn_winpty_init(TRUE) == FAIL)
> -     return FAIL;
> +    has_winpty = dyn_winpty_init(FALSE) != FAIL ? TRUE : FALSE;
> +    has_conpty = dyn_conpty_init(FALSE) != FAIL ? TRUE : FALSE;
> +
> +    if (!has_winpty && !has_conpty)
> +     return dyn_winpty_init(TRUE);
> +
> +    if (opt->jo_term_mode == 'w')
> +     set_string_option_direct((char_u *)"tmod", -1, (char_u *)"winpty",
> +                                                     OPT_FREE|OPT_LOCAL, 0);
> +    if (opt->jo_term_mode == 'c')
> +     set_string_option_direct((char_u *)"tmod", -1, (char_u *)"conpty",
> +                                                     OPT_FREE|OPT_LOCAL, 0);
> +
> +    if (curwin->w_p_tmod == NULL || *curwin->w_p_tmod == NUL)
> 
> I have not talked about code style.
> I am suggesting making code easier to read and making it simple.
> 
> @brammool >
> Include @ntak's patch.
> I will write a patch after that.
> Perhaps someone will write even if I do not write.

I have included the pull request and did a bit of cleanup.  Please try
it out and make any corrections necessary.

I'm not sure about how the 'termmode' option is used, setting it to the
actually used pty is different from how options are normally used.
Perhaps we should only use it for the user to set and give us the
preference.  Then it stays empty by default.  And have another way to
obtain the pty implementation actually used.  Perhaps the value returned
by term_gettty() indicates this?

-- 
An indication you must be a manager:
You can explain to somebody the difference between "re-engineering",
"down-sizing", "right-sizing", and "firing people's asses".

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui