[vim/vim] Make winpty as default on unstable ConPTY environment (#3949)

209 views
Skip to first unread message

K.Takata

unread,
Feb 13, 2019, 5:55:42 AM2/13/19
to vim/vim, Subscribed

This is an alternative solution for #3946.
I think that the current version of ConPTY is still unstable especially for CJK users. So, I think that the default pty type should be winpty for now.
My proposal is:

  • Keep the default value of 'termwintype' as "".
  • If 'termwintype' is "" and if ConPTY is considered stable (Win10 1903? or later), use ConPTY.
  • If 'termwintype' is "" and if ConPTY is considered unstable (1809), use winpty.
  • If 'termwintype' is "" and if ConPTY is not available (before 1809), use winpty.
  • If 'termwintype' is "conpty", use ConPTY even if it is unstable (1809).
  • If 'termwintype' is "winpty", use winpty.

I also found a bug in the version detection of ConPTY in vim.exe.
It wrongly detects that Win10 1703 supports ConPTY, because dyn_conpty_init() uses has_vtp_working() to detect the Windows version. I created a new function has_conpty_working() to properly detect the availability of ConPTY.

Note: The definition of CONPTY_STABLE_BUILD should be updated when the next version of Windows 10 is released.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/3949

Commit Summary

  • Make winpty as default on unstable ConPTY environment

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Codecov

unread,
Feb 13, 2019, 6:18:05 AM2/13/19
to vim/vim, Subscribed

Codecov Report

Merging #3949 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #3949      +/-   ##

==========================================

+ Coverage    78.9%   78.91%   +0.01%     

==========================================

  Files         105      105              

  Lines      142143   142143              

==========================================

+ Hits       112153   112172      +19     

+ Misses      29990    29971      -19
Impacted Files Coverage Δ
src/terminal.c 75.16% <ø> (ø) ⬆️
src/channel.c 83.08% <0%> (-0.08%) ⬇️
src/window.c 83.46% <0%> (ø) ⬆️
src/ex_cmds2.c 84.98% <0%> (+0.09%) ⬆️
src/gui_gtk_x11.c 48.47% <0%> (+0.09%) ⬆️
src/sign.c 92.65% <0%> (+0.13%) ⬆️
src/netbeans.c 27.29% <0%> (+0.22%) ⬆️
src/gui.c 58.57% <0%> (+0.51%) ⬆️
src/if_xcmdsrv.c 84.02% <0%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5382f12...f7d1eac. Read the comment docs.

Nobuhiro Takasaki

unread,
Feb 13, 2019, 6:21:48 AM2/13/19
to vim/vim, Subscribed

Thank you so very much! Tears came out seriously.
And I'm sorry. I will do my best again.

With ConPTY, the cursor can not be erased right now. Therefore, one patch can not be put out.
I will submit it as soon as I can confirm the correct operation.

K.Takata

unread,
Feb 13, 2019, 7:04:03 AM2/13/19
to vim/vim, Push

@k-takata pushed 1 commit.

  • b0dccb8 Use ConPTY if winpty is not installed


You are receiving this because you are subscribed to this thread.

View it on GitHub

K.Takata

unread,
Feb 13, 2019, 7:05:41 AM2/13/19
to vim/vim, Subscribed

#3946 (comment)

Sounds good. One extra situation: If winpty is not installed, then use
ConPTY if available, any version.

Done!

Bram Moolenaar

unread,
Feb 13, 2019, 1:23:56 PM2/13/19
to vim/vim, Subscribed

Closed #3949 via d9ef1b8.

Reply all
Reply to author
Forward
0 new messages