]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.2033: tests: Test_terminal_cwd flaky when using ConPTY v9.1.2033
authorMuraoka Taro <koron.kaoriya@gmail.com>
Wed, 31 Dec 2025 09:42:02 +0000 (09:42 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 31 Dec 2025 09:42:02 +0000 (09:42 +0000)
commit9d71fdaf3a0c3ee25d45dec0e955938d15de8816
tree772699c8a294f4f53aa8eefa703d36aa3da4984b
parent83fc7c4d8e07f3a9a5dfb6fb82889e4cfd134e26
patch 9.1.2033: tests: Test_terminal_cwd flaky when using ConPTY

Problem:  tests: Test_terminal_cwd in test_terminal.vim fails flaky
          in the Windows ConPTY terminal.
Solution: In ConPTY, the timeout is extended to 1msec when reading a
          channel associated with a job that is about to finish.  This
          allows Vim to read the last output of a process in a pseudo
          console. Add comments to make the reasoning clear.
          (Muraoka Taro)

Processes that terminate too quickly in the ConPTY terminal cause Vim to
miss their final output.

In my environment, the probability of the "cmd /D /c cd" used in
Test_terminal_cwd occurring is about 1/4.  For a simple statically
linked Hello World, the probability of it occurring is about 3/4.

closes: #19036

Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/channel.c
src/structs.h
src/version.c